The page isn't redirecting properly - HTTPS HTACCESS rewrite error

有些话、适合烂在心里 提交于 2019-12-02 05:20:10
pomaxa

Based on this question.

RewriteEngine on

# Check for POST Submission | 
# Because POST parameters aren't retained on a redirect.
# You can omit that line if you want to make sure that all POST submissions are secure   
# (any unsecured POST submissions will be ignored)
RewriteCond %{REQUEST_METHOD} !^POST$

# Forcing HTTPS
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{SERVER_PORT} 80
# Pages to Apply
RewriteCond %{REQUEST_URI} ^something_secure [OR]
RewriteCond %{REQUEST_URI} ^something_else_secure
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!