如何使用htaccess将https域重定向到http域?

时间:2015-07-24 08:35:10

标签: apache .htaccess http redirect https

如何重定向

https://domain.com

http://newdomain.com 

使用htaccess?

1 个答案:

答案 0 :(得分:1)

在你的.htaccess中试试这个

RewriteEngine on

RewriteCond %{HTTP_HOST} ^(www\.)?domain.com$
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [NC,R,L]