2013-02-08 123 views
0

我需要一個http頁面重定向到一個HTTPS和隱藏它,如:隱藏重定向HTTP到HTTPS .htaccess的

http://www.example1.com - >https://www.example2.com

所以例1總是在URL欄可見,並且example2被隱藏。

會是這樣的工作?如果不是,我應該改變什麼?

RewriteEngine On 
RewriteCond %{REQUEST_URI} ^/index.html 
RewriteRule ^index.html https://www.example2.com [L] 
RewriteCond %{HTTPS} on 
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} 

回答