Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect based on domain used

Status
Not open for further replies.

bopritchard

Programmer
Jan 27, 2003
199
US
i've got three domains registered cat.com, dog.com and cow.com...they all go to the same site

what i want to do is if someone comes to my site using
I want them redirected to the /cow/ directory of my site...etc...
 
Hi mate,

This can be done from any server-side lanaguage.

A simple example using SSI would be:

<!--#if expr="${SERVER_NAME} = /test_1.com/" -->
JS Redirect/Meta Refresh here
<!--#elif expr="${SERVER_NAME} = /test_2.com/" -->
JS Redirect/Meta Refresh here
<!--#elif expr="${SERVER_NAME} = /test_3.com/" -->
JS Redirect/Meta Refresh here
<!--#endif -->


Hope this helps


Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
or ASP using request.servervariables("HTTP_REFERRER")

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top