我想重定向所有子域(我在apache的虛擬主機設置通配符子域)到HTTPS,如果使用HTTP,所有除了www.domain.comhtaccess的重定向所有子域到https除了WWW
任何非常感激的想法。
這是我到目前爲止有:
# Redirect subdomains to https
#RewriteCond %{HTTPS} off
#RewriteCond %{HTTP_HOST} ^(*)\. [NC]
#RewriteCond %{HTTP_HOST} !^(www)\. [NC]
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
謝謝!
優秀的感謝! – 2011-06-13 09:36:05