Last Updated: February 25, 2016
·
1.081K
· jiceb

Remove trailing slash with .htaccess

<IfModule mod_rewrite.c>
 RewriteEngine On 
 RewriteBase /

 # where the magic is done !
 RewriteRule (.*)/$ $1 [R=301,L]

 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f 
 RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>