How can I force users to access my page over HTTPS instead of HTTP?

前端 未结 21 942
礼貌的吻别
礼貌的吻别 2020-11-28 01:15

I\'ve got just one page that I want to force to be accessed as an HTTPS page (PHP on Apache). How do I do this without making the whole directory require HTTPS? Or, if you s

21条回答
  •  庸人自扰
    2020-11-28 01:42

    Don't mix HTTP and HTTPS on the same page. If you have a form page that is served up via HTTP, I'm going to be nervous about submitting data -- I can't see if the submit goes over HTTPS or HTTP without doing a View Source and hunting for it.

    Serving up the form over HTTPS along with the submit link isn't that heavy a change for the advantage.

提交回复
热议问题