切换到 https:// 后,我们所有的文章都失去了 Facebook 的“点赞”计数。因此,我想仅对我们网站的内容区域禁用 https,该区域位于 /content.php(文章采用 content.php?212-My-Article 的形式)
我当前的 .htaccess:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
我需要添加什么,以便将所有 content.php* 流量重定向到 http(非安全),即使他们输入“https”
Thanks!
您可以使用此代码:
RewriteEngine on
# uri is not /content.php
RewriteCond %{REQUEST_URI} !^/content\.php$ [NC]
# https is off
RewriteCond %{HTTPS} off
# redirec to https site
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)