[英]WordPress: Site is HTTPS; redirect only one site page over HTTP
[英]How to force one page to http (when https is forced site wide)
您好,我正在運行WP安裝,並且在不需要HTTP的頁面上煩人,我不得不從另一個網站(我不擁有)請求HTTP圖像,並且圖像每1小時更新一次,所以我無法只是復制並粘貼它們,我研究了復制/保存它們,代理等。
無論這兩個選項如何工作,我都只需要一個頁面就擁有http,所以我不妨只強制我需要擁有http的頁面,所以我的問題是..如果你們還在關注我! ha ..與下面的.htaccess
一起使用時,如何為我的網站的首頁/索引添加例外,以使https://mysite.co.nz
成為http://mysite.co.nz
(和https://www
等。)
# Test Force ssl
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mysite.co.nz/$1 [R,L]
任何幫助都將是驚人的
嘗試以下2條規則:
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]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.