如何将所有页面重定向到非www https?
http://example.com/* -> https://example.com/*
http://www.example.com/* -> https://example.com/*
https://www.example.com/* -> https://example.com/*
谢谢
使用:
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [NE,L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,L,R=301]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句