我想排除:
http://domain.com/index.php?route=payment/redsys/callback
这就是我在.htacess中所拥有的
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
将所有网址转换为https,如何排除要转换为https的网址? 感谢
答案 0 :(得分:1)
尝试使用此功能,只需将directory
替换为您要停止编组HTTP的文件夹目录。
RewriteEngine On
#Turns HTTPs on for everything, excluding directory
RewriteCond %{HTTPS} =off
RewriteCond %{REQUEST_URI} !^\/directory\/
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,R=301]
#Turns HTTP on for directory
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} \/directory\/
RewriteRule (.*) http://%{HTTP_HOST}/$1 [L,R=301]