Answer the question
In order to leave comments, you need to log in
Why does the .htaccess plug work strangely?
RewriteRule ^info/?$ /index.php?page=info [L,QSA]
There is such a line in the plug. In theory, it should translate to the site at
site.ru/info
This is how it works. But, if you add a slash to the end, for example
site.ru/info/ or site.ru/info////,
then the page you need still opens, although it seems like it should not
Answer the question
In order to leave comments, you need to log in
The rule is triggered for info//// because the RewriteRule input gets a string after all duplicates have been removed, /
i.e. always just info/. If you remove it
from the template, then the rule will work only for site.ru/info
If you need a 301 redirect from /info//// -> /info/^info/?$
/?
RewriteCond %{THE_REQUEST} ^[^?]+//
RewriteRule .* /$0 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question