Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have hosting with GoDaddy, and my account supports multiple domains. My directory structure looks like ~/html, and then ~/html/site1, ~/html/site2, etc. In ~/html I have files for my "main" website, then in ~/html/site1 etc, I have files for my other domains.

The root site is a CakePHP site using mod_rewrite for pretty URLs. When I have the rewrite rules in place it breaks site1, site2, and so on. So I need to tweak my .htaccess to ignore those other sites.

Is there a rule I can add which will not apply mod_rewrite and .htaccess to the subfolders containing my other sites?

share|improve this question
up vote 2 down vote accepted

You could add a RewriteCond using the %{HTTP_HOST} parameter so that the rules will only be used if the host matches the right domain.

RewriteCond %{HTTP_HOST} ^www.domain.tld$

share|improve this answer
Thanks! It took me a while to figure out this RewriteCond condition must precede every rule in my .htaccess file, but I got it working. – the0ther Mar 28 '11 at 3:59

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.