我们已经具有服务器2个域重定向HTTP到HTTPS为多个域
1)exmaple.co
2)exmaple.com.au
如果用户点击第一结构域“example.co “
http://www.exmaple.co
或http://exmaple.co
那么就应该重定向到
https://exmaple.co
如果用户点击第二个域 “example.com.au”
http://www.exmaple.com.au
OR http://exmaple.com.au
那么它应该是 重定向到
https://exmaple.com.au
我们有购买SSL。
我们有使用框架Codeigniter在htaccess中设置编码。
RewriteCond %{HTTP_HOST} ^exmaple.co [NC]
RewriteRule ^(.*)$ http://exmaple.co/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^exmaple.com.au [NC]
RewriteRule ^(.*)$ http://www.exmaple.com.au/$1 [L,R=301]
如果我使用上面的代码,那么它会进行重定向循环。