Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.