0
我想重定向到https://example.com
https://www.example.com
寫入規則和SSL不工作
如果我去https://example.com/aboutus
,
也應該重定向到https://www.example.com/aboutus
。
目前,我在.htaccess
這個,但它使ssl證書消失。
RewriteCond %{HTTPS} off
RewriteCond %{DOCUMENT_ROOT}/../.force_ssl -f
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule^http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]