2014-06-24 42 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( –