我需要实现SSL重定向。HTTP/https和非www应强制重定向到https://www URL。
htaccess文件中存在浏览器验证码,这就是重定向到https://exmpledomain/.shtml的原因
发布于 2019-07-10 13:29:15
After the Authentication code please write this
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ ([^\ ]+)
RewriteRule ^ https://www.%{HTTP_HOST}%2 [L,R=301]
RewriteCond %{HTTPS} off
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ ([^\ ]+)
RewriteRule ^ https://%{HTTP_HOST}%2 [L,R=301]https://stackoverflow.com/questions/56341918
复制相似问题