Answer the question
In order to leave comments, you need to log in
How to make a correct redirect to https://site.ru?
It is required to make a redirect, in one go to https://site.ru from all possible options:
site.ru
www.site.ru
site.ru/index.php
www.site.ru/index.php
www.site.ru
etc.
I currently have this:
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ https://site.ru/ [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