Posted By

marzsman on 04/05/11


Tagged

htaccess


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

laurentzziu


htaccess snippets


 / Published in: Apache
 

Some url rewriting snippets

  1. ### REWRITE DEFAULTS ###
  2. RewriteEngine On
  3. RewriteBase /
  4.  
  5. ## FORCE WWW ##
  6. RewriteCond %{HTTP_HOST} ^url\.com$ [NC]
  7. RewriteRule ^(.*)$ http://www.url.com/$1 [L,R=301]
  8.  
  9. ## REMOVE index.php ##
  10. RewriteCond %{REQUEST_FILENAME} !-f
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteRule ^(.*)$ index.php/$1 [L]

Report this snippet  

You need to login to post a comment.