I am currently using

RewriteCond %{REQUEST_URI} !^/system [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)/$ /$1 [R=301,L,QSA]

to remove trailing slashes in my urls, however for some reason it does not work with the multi language module - I'm using Expression Engine 2.9.0 and Multi Language 2.0.1


domain.co.uk/link/ > domain.co.uk/link (trailing slash is removed)
domain.co.uk/cy/link/ > domain.co.uk/cy/link/ (trailing slash is NOT removed)

I realise this is legacy software but I'm just trying to maintain this site.

1 Answer 1


Right below the RewriteEngine On line, add:

RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R] # <- for test, for prod use [L,R=301] to enforce a no-trailing-slash policy.

To enforce a trailing-slash policy:

RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*[^/])$ /$1/ [L,R] # <- for test, for prod use [L,R=301]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.