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 Chris Miller 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 a domain

Status
Not open for further replies.

ironhide1975

Programmer
Feb 25, 2003
451
US
I have a website being hosted on a apache server and I have one web domain that when it hits the server I want it to direct the user to a subfolder. I know I need to modify teh httaccess file. Can someone point me to an example of this?

 
So how would I write a redirect in the file just?

How do I say if user comes from go to folder /gt/index.php?

Code:
Redirect /service [URL unfurl="true"]http://www.theotherwebsite.com/service[/URL]
 
Hi

Ok. One more question would be if site1.com and site2.com are pointing to the same content or they are distinct virtual hosts. The second situation is the normal one and you do not need anything more for that.

Feherke.
 
site1 and site2 are hosting on he same server, same account, both domains are pointing to the same location. I just want the unix to determine if the user is accessing the site2 domain, they go to a specific directory.

basically trying to host two domains under one hosting solutions

 
Okay I did exactly that, I put that in my httaccess file on my server, but when you type in site2.com it goes to the site1.com site. Is there anything else I need to change.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top