Sign up ×
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 - & both pointing to the same location.

I want to load contents in the DocumentRoot of the location whereas 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] 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


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

Browse other questions tagged or ask your own question.