Exclude certain subfolders and domains in redirects

Posted by Alexsander Akers on Stack Overflow See other posts from Stack Overflow or by Alexsander Akers
Published on 2009-11-13T22:22:56Z Indexed on 2010/05/25 21:01 UTC
Read the original article Hit count: 269

Filed under:
|
|
|
|

This is a continuation from http://stackoverflow.com/questions/1704845/redirect-only-html-files

How can I change my .htaccess to make it exclude certain subfolders or subdomains from the HTML-only redirect? I tried doing using this code to exclude the 'downloads' subfolder and the 'dev' and 'support' subdomains, but it didn't work:

RewriteCond %{HTTP_HOST} ^pandamonia.us$ [OR]
RewriteCond %{HTTP_HOST} ^www.pandamonia.us$ [OR]
RewriteCond %{HTTP_HOST} !download [OR]
RewriteCond %{HTTP_HOST} !faq
RewriteCond %{HTTP_HOST} !support [OR]
RewriteRule /.+\.html$ "http\:\/\/pandamonia\.us\/" [L]

© Stack Overflow or respective owner

Related posts about html

Related posts about apache