如何将一个页面强制为http(当在整个站点范围内强制使用https时)


How to force one page to http (when https is forced site wide)

你好,我正在运行WP安装,令人恼火的是,在一个不需要https的页面上,我必须从另一个网站(我不拥有)请求http映像,映像每1小时更新一次,所以我不能只复制和粘贴它们,我已经研究了复制/保存它们、代理等。

不管这两个选项如何,我只需要一个页面有http,所以我还不如强迫我需要的页面有http。所以我的问题是……如果你们还在关注我的话!哈对于下面的.htaccess,我如何为我的站点的主页/索引添加一个例外,以使https://mysite.co.nzhttp://mysite.co.nz(以及https://www等)

# Test Force ssl
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://mysite.co.nz/$1 [R,L]

任何帮助都将超越惊人的

试试这两条规则:

RewriteEngine On
RewriteCond %{SERVER_PORT} =443
RewriteRule ^/?$ http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} =80 
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

检查此-htaccess重定向到ssl仅适用于某些页面,www不安全用于其他页面

# Remove SSL on other pages
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !checkout|login|my-account|administrator|webshop
RewriteCond %{HTTP_HOST} ^(www'.)?(.*)$ [NC]
RewriteRule ^(.*)$ http://www.%2/$1 [R=301,L,QSA]