Avatar of 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".

Apache Web Server

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

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!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy