M
M
matveyboyko2015-08-20 10:59:56
htaccess
matveyboyko, 2015-08-20 10:59:56

How to redirect a page from http to https?

Hello!
The site has moved to https.
How to make a correct redirect so that when you click on

http://homster-online.com/korpusnaja-mebel-123.html

fell on
https://homster-online.com/korpusnaja-mebel-123.html
?
Rule in .htaccess:
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

does not solve the problem.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Ken Jee, 2015-08-20
@Machez

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

M
matveyboyko, 2015-08-20
@matveyboyko

Does not help.
When you click on the link homster-online.com/korpusnaja-mebel-123.html, you get to https://homster-online.com/.
Although https://homster-online.com/korpusnaja-mebel-123.html is all right.

A
Andrey Khomlyuk, 2015-08-20
@Bizzaro

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question