/ Published in: Apache

Removes trailing slashes from URLs, forces all urls to index.php
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
RewriteCond %{http_host} ^MyExample.com [nc] RewriteRule ^(.*)$ http://www.MyExample.com/$1 [r=301,nc,L] RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ /$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
Comments
