Link to home
Start Free TrialLog in
Avatar of swhitlow
swhitlow

asked on

Redirect URL Question

Hello. I am kind of new with the apache thing so please bare with me. I have a domain hosted on a VPS that I have full access to. I have the domain name www.domain1.com going to the correct place. However, I have added a second domain name and I need the domain called www.domain2.com to go to a subdirectory of domain1. Does this make sense? My directory structure is /home/webadmin/domain1/

So I assume I need an .htaccess file in that subdirectory telling it what to do. Am I correct?

Also, I need it to "mask" the url. In other words, when the user types in www.domain2.com it will go the subdirectory of domain1/domain2. However, in the users internet browser it needs to read "www.domain2.com". Not "www.domain1.com/domain2".

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swhitlow
swhitlow

ASKER

I resolved this on my own. It is to use mod_rewrite in apache. I will give the points to ravenpl though because he is the one only one who posted . Thanks!