0
我有我的SSL证书域,我想重定向一切使用https://www.example.com(以https和www)重定向组合
这是我到目前为止有:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1
然而,这两个组合不起作用,并显示apache2默认页面:
http://example.com
http://www.example.com
我错过了什么?