网站特定页面启用https


环境:apache+ubuntu+php
目前需要在一个wordpress站点启用https,但不需要全站,只打算在登录和一个表单申请页面使用。
想问一下该如何配置。
谢谢。

https php wordpress

笑而不语。 10 years, 2 months ago

用 apache 的 rewrite 处理一下,比如


 RewriteCond %{HTTPS} =off [NC]
RewriteCond %{THE_REQUEST} /(login|register) [NC]
RewriteRule ^(login|register) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]

比利·海靈頓 answered 10 years, 2 months ago

Your Answer