尝试在强制HTTPS的服务器上允许HTTP

时间:2015-11-18 00:09:04

标签: apache http httpd.conf

RewriteEngine On RewriteCond%{SERVER_PORT} 80 RewriteRule ^(。*)$ https://abc.domain.com/ $ 1 [R,L]

上面的代码工作正常,但我想为URL添加例外,类似于: abc.domain.com/index.php/api/soap/?wsdl

上面的网址应该加载HTTP

任何?

1 个答案:

答案 0 :(得分:0)

试试这个

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/index.php/api/soap/$ [NC]
ReWriteCond %{QUERY_STRING} !^wsdl$ [NC]
RewriteRule ^(.*)$ https://abc.domain.com/$1 [R,L]