【发布时间】:2012-03-19 15:12:42
【问题描述】:
我想通过 .htaccess 从 https url 中删除 www。 例如
我想改变
https://www.example.com/ 到https://example.com/
我尝试了很多规则
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ https://example.come/$1 [L]
和
RewriteCond %{SERVER_PORT} ^443
RewriteCond %{HTTP_HOST} ^www\.
RewriteRule (.*) https://example.com$1 [L,R,QSA]
和
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
但没有任何效果。请帮帮我
【问题讨论】: