什么是确保页面安全的简洁方法?

Tef*_*Ted 3 forms security ssl https

假设您有一个收集和提交敏感信息的表单,并且您希望确保它永远不会通过不安全(非HTTPS)方式访问,那么您最好如何执行该策略?

Jus*_*oss 5

如果你正在运行Apache,你可以把它RewriteRule放在你的中.htaccess,如下:

RewriteCond %{HTTPS} "off"
RewriteRule /mypage.html https://example.com/mypage.html
Run Code Online (Sandbox Code Playgroud)