.htaccess 重新使用https://alias 到https://web 毫无预兆

.htaccess 重新使用https://alias 到https://web 毫无预兆,.htaccess,http-redirect,domain-aliasing,.htaccess,Http Redirect,Domain Aliasing,我需要所有我有SSL证书的请求。 我的别名example.ch通过重定向到example.com <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^example.ch$ [OR] RewriteCond %{HTTP_HOST} ^www.example.ch$ RewriteRule (.*)$ http://www.example.com/$1 [R=3

我需要所有我有SSL证书的请求。 我的别名example.ch通过重定向到example.com

<IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteCond %{HTTP_HOST} ^example.ch$ [OR]
     RewriteCond %{HTTP_HOST} ^www.example.ch$
     RewriteRule (.*)$ http://www.example.com/$1 [R=301,L]
</IfModule>

但是它不起作用。

有没有办法克服这个警告并顺利重定向?对还可以为
example.ch
获取有效的证书。这是您唯一的选择。可能重复感谢您的回答,对于这样的目的,什么是最好的证书(只是重定向)?
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} =on