Title: Mod_rewrite
Last modified: August 18, 2016

---

# Mod_rewrite

 *  [trwilliams](https://wordpress.org/support/users/trwilliams/)
 * (@trwilliams)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/mod_rewrite-1-3/)
 * Hi.
 * I have used the search feature, but haven’t seem to have found a solution to 
   my problem.
 * I basically want to have my wordpress rewrite rule:
 * > <IfModule mod_rewrite.c>
   >  RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME}!-
   > f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule
   > >
 * And on top of that, I want to use my own rewrite rule for some of my pages:
 * > RewriteRule ^about$ about.php
   >  RewriteRule ^photographs$ gallery.php RewriteRule
   > ^templates$ templates.php RewriteRule ^links$ links.php RewriteRule ^contact
   > $ contact.php RewriteRule ^contactsecure$ contact_secure.php RewriteRule ^accessibility
   > $ accessibility.php RewriteRule ^privacy$ privacy.php RewriteRule ^legal$ copyright.
   > php
 * But the problem is that if I put these rules together, they clash. Is there anyway
   around this without me having to use wordpress as a CMS?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/mod_rewrite-1-3/#post-580482)
 * theres no problem with that..
 * what you need to do is put those rules before the regualr wordpress stuff AND
   you need to use stop the processing at that rule ..
 * so you do this:
 *     ```
       <IfModule mod_rewrite>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^about$ about.php [L]
       RewriteRule ^photographs$ gallery.php [L]
       RewriteRule ^templates$ templates.php [L]
       RewriteRule ^links$ links.php [L]
       RewriteRule ^contact$ contact.php [L]
       RewriteRule ^contactsecure$ contact_secure.php [L]
       RewriteRule ^accessibility$ accessibility.php [L]
       RewriteRule ^privacy$ privacy.php [L]
       RewriteRule ^legal$ copyright.php [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       ```
   
 *  Thread Starter [trwilliams](https://wordpress.org/support/users/trwilliams/)
 * (@trwilliams)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/mod_rewrite-1-3/#post-580505)
 * But that doesn’t work, just get 404 on all pages including blog posts.
 *  Thread Starter [trwilliams](https://wordpress.org/support/users/trwilliams/)
 * (@trwilliams)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/mod_rewrite-1-3/#post-580543)
 * Fixed.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Mod_rewrite’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 2 participants
 * Last reply from: [trwilliams](https://wordpress.org/support/users/trwilliams/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/mod_rewrite-1-3/#post-580543)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
