Web redirect allows you to organize a redirect to another address without having a site on the hosting.
domain.com
on site.ua
, the redirect will work according to the following principle:https://(www.)domain.com
an error will occur due to the fact that the web redirect does not support HTTPS protocol.http://(www.)domain.com
will be redirected to http(s)://site.ua
... The target site address can be specified with the protocol HTTPS, since this does not affect the work of the redirect. To set up a web redirect, do the following:
If you want the redirect to work not only over HTTP, but also over HTTPS, the web redirect in this case will not fit... If you have the ordered hosting service, you can organize a redirect via HTTPS in one of the ways.
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?fromwhere.com [NC] RewriteRule ^(. *) https: //www.goda.com/ [L,R=301]
Instead fromwhere.com
substitute the domain, from which a redirect should be performed (it was added as an alias), and instead of www.куда.com
— on which.
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?(fromwhere1.com|fromwhere2.com) [NC] RewriteRule ^(. *) https: // where.com/ [L,R=301]
Instead fromwhere1.com
and fromwhere2.com
substitute domains, from which a redirect should be performed (they were added as aliases), and instead of www.куда.com
— on which.
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?fromwhere1.com [NC] RewriteRule ^(. *) https: //www. where1.com/ [L,R=301] RewriteCond %{HTTP_HOST} ^(www.)?fromwhere2.com [NC] RewriteRule ^(. *) https: //www. where2.com/ [L,R=301]
Instead fromwhereX.com
substitute the domain, from which a redirect should be performed (it was added as an alias), and instead of www.whereX.com
— on which.