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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help with mod_rewrite

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi.

I have two domains that point to the same IP (they are both hosted via web host who has setup a virtual host).

domainA.com & domainB.com point to the same IP.

I don't have access to httpd.conf, so I need to be able to make domainB.com go to a different place using .htaccess and mod_rewrite. None of the examples I have work.

For example:
domainA.com will go to the documentRoot.
domainB.com will go the documentRoot/domainB

How would I word that syntax? would have to work too. Also, is there a way to make it should that users won't see the domainB directory at the end of the URL? Effectivily changing the document root for domainB, using .htaccess?

So if a user visted:

it would go to > documentRoot/bob.jpg
browser would display: in address bar.

it would go to > documentRoot/domainB/tim.jpg
browser would display: in address bar.

Is this possible with mod_rewrite, I'm fairly sure it is. I just haven't be able to find the answer in any documentation.

Thanks!
JS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top