Answer the question
In order to leave comments, you need to log in
How to correctly set up a redirect from http to https, without the get parameter?
Good day. With .htaccess for now, please help!
The site has moved to https.
.htaccess contains the following redirect
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Example:
Page site.ru/news - redirects to site.ru/index.php?q=news
although the site page is actually indexed https://site.ru/new
Tell me how to set up a redirect without "index.php?q="
Answer the question
In order to leave comments, you need to log in
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]
you must redirect BEFORE initializing the core of the engine
to and the engine should be responsible for returning 200 OK.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question