Preventing rewriteRules from affecting subdirectories

Discussion in 'Apache' started by nestman, May 9, 2012.

  1. #1
    I have a website in a subdirectory that is being negatively affected by AddType application/x-httpd-php .htm .xml .rss So I learned on a website that I need to give it a condition so that only the parent website will have this rule applied to it. But unfortunately I'm getting a server error with the following.

    RewriteCond %{HTTP_HOST} ^oil\-testimonials\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.oil\-testimonials\.com$
    RewriteRule AddType application/x-httpd-php .htm .xml .rss

    Any pointers on how to correct this?

    Thanks!
     
    nestman, May 9, 2012 IP