How can I prevent access to a subdirectory based on HTTP_HOST.
I have 2 parked domains pointing to one directory. They both serve up the same website.
However I wish each to have a seperate wordpress blog. To do this I’m installing them in different directories.
domain1.com/domain1-blog/
domain2.com/domain2-blog/
The trouble is the directories are accessible across domains. For instance
domain1.com/domain2-blog/
domain2.com/domain1-blog/
I REALLY don’t want people to be able to access across domains. WordPress will break and I will get duplicate content issues in Google.
What is the EXACT code I need to put into my htaccess file to serve up a 404 error should anyone try to access
domain1.com/domain2-blog/
OR
domain2.com/domain1-blog/
I thought maybe using HTTP_HOST combined with mod_rewrite somehow?
I’m a big newb when it comes to htaccess, so the more explicit you can be the better.
Thanks
Try adding the following to your htaccess file in the root directory of your domain