简体   繁体   English

如何将一页强制到http(在整个站点都强制使用https时)

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

Hello I am running a WP install and annoyingly on one page that doesn't really need https I have to request http images from another site (that I don't own) and the image(s) update every 1hr so I can't just copy and paste them, I've looked into copy/saving them, proxies etc.. 您好,我正在运行WP安装,并且在不需要HTTP的页面上烦人,我不得不从另一个网站(我不拥有)请求HTTP图像,并且图像每1小时更新一次,所以我无法只是复制并粘贴它们,我研究了复制/保存它们,代理等。

I'll need one page to have http only regardless for those two options to work anyway so I might as well just force the page I need to have http, so my question is.. if you guys are still following me! 无论这两个选项如何工作,我都只需要一个页面就拥有http,所以我不妨只强制我需要拥有http的页面,所以我的问题是..如果你们还在关注我! ha.. is with the .htaccess below how can I add an exception for the home/index of my site to make https://mysite.co.nz to http://mysite.co.nz (and https://www etc..) 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]

Any help would be beyond amazing 任何帮助都将是惊人的

Try these 2 rules: 尝试以下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]

Check this - htaccess redirect to ssl only for certain pages and www non secure for the other pages 选中此选项-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.

相关问题 WordPress:网站是HTTPS; 通过HTTP仅重定向一个站点页面 - WordPress: Site is HTTPS; redirect only one site page over HTTP Magento - 需要对两个页面强制使用 HTTP,网站的其余部分强制使用 HTTPS - Magento - Need to force HTTP for two pages, and the rest of the website forced to HTTPS 如何强制 http 为 https - How to force http to https 用www强制一个站点使用http并使用www强制将secure-email文件夹强制使用https - Force one site to http with www and force secure-email folder to https with www Laravel 4的全站https - Site wide https with Laravel 4 如何在.htaccess中强制使用单个页面的HTTP而不是https - How to force http of a single page instead of https in .htaccess 如何强制symfony2仅对一页使用HTTPS - How to force symfony2 to use HTTPS only for one page WordPress将整个站点重定向到HTTPS,然后将一页的重定向规则添加到HTTP - WordPress redirect full site to HTTPS and then add redirect rule for one page to HTTP Codeigniter:检查并强制将一个页面强制为https:// - Codeigniter: Check and force one page to https:// 我的网站是https,现在我想包含http的iframe,那么如何才能仅通过https创建一个页面。 - My site is https, now i want to include iframe that are http, so how can i make a page only http from https.
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM