本文介绍了使用的.htaccess控制HTTPS上某些网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个网站,需要(显然)HTTPS进行结帐。目前修复放在参与制作在SSL模式下整个网站运行的地方,但是这导致的问题。
I've got a site that requires (obviously) HTTPS for checkout. The current fix put in place involved making the whole site run in SSL mode, but this is causing problems.
我将如何改变这个...
How would I change this...
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
要只设置一个特定的URL(比如basket.php)为HTTPS?
To only set a certain URL (say basket.php) as HTTPS?
推荐答案
我beleive这会工作:
I beleive this would work:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /basket.php
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
这篇关于使用的.htaccess控制HTTPS上某些网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!