This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Apache redirects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Apache redirects" Watch "Apache redirects" New topic

Apache redirects

sagar shiraguppi
Ranch Hand

Joined: Jul 16, 2007
Posts: 74
I have written the redirect rule something like this in httpd.conf file

RewriteRule ^/internetadvertising(.*)$ [R=301,L,NE]

The issue I am facing is whenever i hit the any of the source URL mentioned below, its going to that is second Destination URL.

I am facing difficult to make apache to understand to differenciate the below two source URL so that it can land up in respective destination URL.

1)Source URL--> Destination URL-->


2)Source URL --> Destination URL-->

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42954
Put something like

RewriteCond %{HTTP_HOST} ^xyz\.com$


RewriteCond %{HTTP_HOST} ^yelldirect\.com$

before each RewriteRule, repectively.
rocket mass heater kickstarter
subject: Apache redirects