Answer the question
In order to leave comments, you need to log in
Exception in .htaccess rule for slash?
Good day.
CMS Joomla
has a code in htaccess that removes the slash at the end of urls:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R=301,L ]
How to make exceptions in this condition for the language prefix.
So that the slash at the end remains in the urls of the form:
https://site.ua/uk/
https://site.ua/en/
and removed in all other cases (this is how it works now):
https://site.ua /uk/page1
https://site.ua/en/page1
https://site.ua/page1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question