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>
Written by J.C. | jicéb
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#