Title: mod_rewrite exclusion
Last modified: August 18, 2016

---

# mod_rewrite exclusion

 *  [qoncept](https://wordpress.org/support/users/qoncept/)
 * (@qoncept)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/mod_rewrite-exclusion/)
 * I’ve got webstats in a virtual directory forwarded from /stats/ on my site. So
   when mod_rewrite see’s the directory /stats/ doesn’t exist, it goes ahead and
   rewrites the URI for WordPress. I’ve been toying with it for over an hour so 
   far and I can’t get it to work properly. Here’s what I’ve got in my htaccess:
 *     ```
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} -d !stats
       RewriteRule . /index.php [L]
       </IfModule>
       ```
   
 * Looks to me as though it should work, and it [i]does[/i] when I go to /stats/,
   but when I try to look at the root or any other WordPress page, I get a 500 internal
   server error.
 * Any tips? I’ve made it work with any URI containing “stats” but it’s a word I’m
   not going to be able to avoid in topic names, so that ain’t gonna cut it. Thanks!

The topic ‘mod_rewrite exclusion’ is closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [mod_rewrite](https://wordpress.org/support/topic-tag/mod_rewrite/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [qoncept](https://wordpress.org/support/users/qoncept/)
 * Last activity: [18 years, 9 months ago](https://wordpress.org/support/topic/mod_rewrite-exclusion/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
