D
D
demidov_grinch2020-01-29 16:23:56
URL Handling
demidov_grinch, 2020-01-29 16:23:56

Why does the redirect only redirect from http to https from the homepage?

Good afternoon!

There are lines in the .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]

When you go to the site from the main page, it is redirected from the http protocol to https. When you try to enter the site NOT from the main page, no redirect to https occurs. How to be?

Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail, 2020-01-29
@RuComMarket

https://alittlebit.ru/blog/vebmasterskaya/servers/...

N
Nikita Shinkevich, 2020-01-29
@domres

RewriteCond %{HTTP_HOST} ^www.domain.ru$ [NC]
RewriteRule ^(.*)$ https://www.domain.ru/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question