code_junkie

How do I mod rewrite an entire site excluding a couple of subdirectories

Nov 13th, 2011
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. RewriteEngine on
  2. RewriteRule ^([^/.]+)/?$ index.php?section=$1 [L]
  3. RewriteRule ^([^/.]+)/([^/.]+)/?$ index.php?section=$1&page=$2 [L]
  4. RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/?$ index.php?section=$1&page=$2&split=$3 [L]
  5.  
  6. RewriteRule ^([^/.]+)/?$ index.php?action=$1 [L]
  7.  
  8. RewriteEngine on
  9. RewriteCond %{REQUEST_URI} !^/(access|edit)/
  10. RewriteRule ^([^/.]+)/?$ index.php?section=$1 [L]
  11. ...
  12.  
  13. RewriteEngine on
  14. RewriteRule ^/access/ - [L]
  15. RewriteRule ^/edit/([^/.]+)/?$ /edit/index.php?action=$1 [L]
  16. ... (other rules)
Add Comment
Please, Sign In to add comment