/ Published in: Apache

Some url rewriting snippets
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
### REWRITE DEFAULTS ### RewriteEngine On RewriteBase / ## FORCE WWW ## RewriteCond %{HTTP_HOST} ^url\.com$ [NC] RewriteRule ^(.*)$ http://www.url.com/$1 [L,R=301] ## REMOVE index.php ## RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L]
Comments
