2014-06-24 43 views
0

好的,在Google和Google上研究了這個問題。嘗試獲取https網址以重定向到非HTTPS網址。Apache .htaccess從https重定向到單個URL的非https

我已經嘗試了各種連擊,但是,沒有什麼工作這個網址:

https://www.urotoday.com/403-perspectives-from-the-editor-in-chief-june-2014

所有我想要做的是重定向到http://www.urotoday.com/403-perspectives-from-the-editor-in-chief-june-2014

這沒有;爲我工作:

RewriteCond %{HTTPS} on 
RewriteCond %{REQUEST_URI} ^/403\-perspectives\-from\-the\-editor\-in\-chief\-june\-2014$ 
RewriteRule .* "http\:\/\/www\.urotoday\.com\/403\-perspectives\-from\-the\-editor\-in\-chief\-june\-2014" [R=301,L] 

回答

1

將這個規則在您DOCUMENT_ROOT的htaccess:

RewriteEngine On 
RewriteCond %{HTTPS} on 
RewriteRule ^(403-perspectives-from-the-editor-in-chief-june-2014)/?$ http://%{HTTP_HOST}/$1 [R=301,L,NC] 

讓我知道這是否正常工作。 :)

+0

+1是的,它應該工作。 – anubhava

+0

@anubhava謝謝,anubhava。 : – zx81

+0

只需重新讀取並將.htacess放入網站根目錄並且它會導致整個網站以404( –