There is a RewriteRule ^blabla(/.*)*$ $1 , after processing this rule , 3 slashes are added after the domain. Can you tell me how to solve this? It works like this for me: from mysite.ru/blabla/page.html it does mysite.ru///page.html , and if mysite.ru/blabla/ , it turns out mysite.ru/// .
|
2 answers
try to put / for brackets. and the quantifier * after the group, it seems to me, is superfluous:
^blabla/(.*)$ this will remove at least one / , and the second “appears”, apparently from somewhere else.
|
Eliminate repeated slashes (///) from url
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$ RewriteRule (.*) %1/%2 [R=301,L] I use this option. This rule should be added to htaccess.
|
RewriteRule ^blabla(/.*)$ $1 [L,R=301]works fine, without the appearance of additional slashes. - Visman