Answer the question
In order to leave comments, you need to log in
How to redirect from one https domain to another https domain using .htaccess?
There is a domain: site.studio
, using this code in .htaccess it redirects to site.com:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} site.studio
RewriteRule (.*) https://site.com/$1 [R=301,L]
</IfModule>
https://site.studio
then I get an error:Can't access site
site.studio
SSL connected
to the domain . How to correctly write in .htaccess so that when https://site.studio
it also redirects to https://site.com
?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question