Answer the question
In order to leave comments, you need to log in
How to correctly set up a redirect in .htaccess from the site alias?
Hey!
.htacces has a rule that redirects from http to https:
RewriteEngine On
RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [redirect=301]
The site has an alias site .ru, when entered in the browser line, a warning appears that the connection is not secure, since ssl is issued only for one site.com domain, and the final address in the browser line looks like this:
https://site.ru
How to add a rule to from the address of the pseudonym, the transition was carried out either to http://site.ru, or to the original domain https://site.com ?
Thank you!
Answer the question
In order to leave comments, you need to log in
So it must be done before connecting all these ssl
quasiocculti.com/blog/dns-redirect
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question