我正在尝试
https://www.example.com
和
http://test.example.com
但是当我尝试http://test.example.com
时,它一直被重定向到https://www.example.com
我该如何解决?
# maindomain -> https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(?:www\.)?(example\.com)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R,L]
# subdomain -> http
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^(?:www\.)?(test\.example\.com)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R,L]