Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am trying to mask sub directories to effectively work as DocumentRoot for multiple domains. e.g. I have two domains - domain1.com & domain2.com both pointing to the same location.

I want domain1.com to load contents in the DocumentRoot of the location whereas domain2.com should behave as if the DocumentRoot for it is within a subdirectory let's say domain2.dir.

How do I achieve this using .htaccess? I tried the following but it did not work:

RewriteCond %{HTTP_HOST} ^domain1\.com [NC]
RewriteRule (.*) /domain2.dir [L]

The error I get is as below:

[Tue Jun 04 17:42:54 2013] [error] [client 192.168.1.30] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

I would appreciate any help on this.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.