S
S
Sergey Bulgakov2020-02-05 04:51:14
htaccess
Sergey Bulgakov, 2020-02-05 04:51:14

How to make a redirect for a site?

Hello, please tell me how to make a redirect for the site

, the site name was _http://old-site.ru_

then it became _http://new-site.ru_

then it became http s ://new-site.ru

using isp manager.

for the domain I registered aliases
old-site.ru

in the field "aliases" (isp manager) http, https do not prescribe

-------------------------
Attention, problem:

from the address _http://old-site.ru_ Does not redirect to httpS://new-site.ru ,

from the address http S ://old-site.ru does not redirect to http S ://new-site. ru, swears at https:
"This website's security certificate has been issued for a website with a different address.",
i.e. if you press "continue opening this website" with your hands, it goes to _https://new-site.ru,
but if you do not press with your hands, it does not automatically go to .
-------------------------

at http S :// old-site .ru the site is not shown

in .htaccess there is
RewriteEngine On

RewriteCond %{HTTPS } !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

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

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Demchenko, 2020-02-18
@DaniilDemchenko

Tell me, do you have access to DNS management _ http://old-site.ru_ ?
It’s not easier to redirect to _new-site.ru_ and when you go, _ https://new-site.ru will open,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question