Posted By

eivind on 01/07/10


Tagged

textmate htaccess apache niceurl


Versions (?)

htaccess


 / Published in: Other
 

  1. <IfModule mod_rewrite.c>
  2. Options FollowSymLinks
  3. RewriteEngine On
  4. RewriteCond %{REQUEST_FILENAME} !-fq
  5.  
  6. #Rewrites ignores these folders.
  7. #RewriteRule ^includes/.*$ - [PT]
  8. RewriteRule ^static/.*$ - [PT]
  9.  
  10. #Pretty URL rewrites
  11. RewriteRule ^([^/.]+)/?$ index.php?action=$1 [L]
  12. RewriteRule ^([^/.]+)/([^/.]+)/?$ index.php?action=$1&section=$2 [L]
  13. RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/?$ index.php?action=$1&section=$2&subsection=$3 [L]
  14. RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)/?$ index.php?action=$1&section=$2&subsection=$3&do=$4 [L]
  15.  
  16. #Error
  17. ErrorDocument 404 /index.php?page=error&section=404
  18. </IfModule>

Report this snippet  

You need to login to post a comment.