这对我来说很棒,因为它将 www.domain.com 和 domain.com 重定向到https://www.domain.com
我的问题是像 sub.domain.com 这样的子域现在也被重定向到那里。如何保留现有功能但不影响子域?
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]
这对我来说很棒,因为它将 www.domain.com 和 domain.com 重定向到https://www.domain.com
我的问题是像 sub.domain.com 这样的子域现在也被重定向到那里。如何保留现有功能但不影响子域?
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]