0
我用下面的規則,但具有與子域的問題作爲http://sub.example.com被重定向到https://sub.example.com/sub,而不是https://sub.example.com非www會以https WWW子域發出
RewriteEngine On
# Redirect non-www to (ssl) www
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
# Redirect non-SSL to SSL
RewriteCond %{HTTPS} !on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
可能是什麼問題?
有什麼期望的結果? – Bananaapple
編輯我的問題,包括所需的結果/重定向 – Webbs