Answer the question
In order to leave comments, you need to log in
How to make a redirect with multiple slashes /// immediately to https?
The essence of the problem is that if you go to a link like https://domen.ru/page////// the following chain of consecutive redirects occurs : https://domen.ru/page//////
= > http : // domen.ru/page/ => https :// domen.ru/page/
It is necessary that a 301 redirect like https :// domen.ru/page////// => https :/ /domen.ru/page/ There
are two rules in my htaccess, how to properly group/combine them, and is there such a possibility at all?
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI } [L,R=301]
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
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