[英]Change HTTPS to HTTP for three pages on our site
I am looking to exclude 3 pages from my https. 我想从我的https中排除3个页面。 So to force them to use http:// instead of my rule to set to https:// - I've tried many ways but believe my https rule is overriding them. 因此,迫使他们使用http://而不是将我的规则设置为https://-我尝试了很多方法,但相信我的https规则会覆盖它们。 If anyone can help me write an exclusion for those pages within my rules? 是否有人可以帮助我在我的规则内为这些网页写一个排除项? Is this even possible? 这有可能吗?
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^([^\.]+)\.example\.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
Try using this - 尝试使用-
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{THE_REQUEST} /(page1|page2|page3) [NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,NE,R=302]
Not sure which all three pages you want to exclude from https hence have used page1,page2 and page3 for example. 不确定要从https中排除的所有三个页面是否使用了page1,page2和page3。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.