codeigniter:检查并迫使一个页面到https:// [英] Codeigniter: Check and force one page to https://
本文介绍了codeigniter:检查并迫使一个页面到https://的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最希望我的网站来为http://但结帐单页以https://开头
I want most of my site to be http:// but for a single checkout page to be https://
如何检查和用户切换到https://所以没有机会,他们可以使用它以http://
How can I check and switch the user to https:// so there's no chance they can use it with http://?
推荐答案
您可以做到这一点在这种方式测试,对我来说工作得很好
You can do it in this way tested and works fine for me
将此code在的.htaccess
文件
RewriteEngine On
RewriteCond %{HTTPS} !^on$
RewriteRule ^checkout ? https://myproject.localhost/my_checkout_url [R,L]
希望它工作正常,也
Hope it works fine for you also
这篇关于codeigniter:检查并迫使一个页面到https://的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文