Question: This is a continuation from [Redirect only HTML files?](https://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]

```

Answer: 
You need to check *REQUEST\_URI* or the whole match of the `RewriteRule` `$0` for this; *HTTP\_HOST* does only contain the host name of the current request. You also need to change the logical expression of your condition:

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

```
For those looking for a quick bit of insight into Gumbo's previous reply (where he mentions the situations for when to (and not to) use *[OR]*, I found this WMW thread very helpful: <http://www.webmasterworld.com/apache/3522649.htm>