0
我想下面的地址重定向到https://www.foobar.com
:的所有流量重定向到https:// WWW使用.conf文件(的httpd/Apache2的)
- http://www.foobar.com
- http://foobar.com
- https://foobar.com
我已經使用這個嘗試,但它不工作:
等/的httpd/conf.d/ssl_rewrite.conf
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]