我们有一个用于 eg 的 url, https://www.egdomain.com/
并且 ssl 对 egdomain.com 有效。那么我如何将所有请求重定向https://www.egdomain.com/
到https://egdomain.com/
该网站也有正常的http请求,可以正常工作。
我尝试了下面的 htaccess 但仍然没有
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteCond %{HTTP_PORT} =443
RewriteRule (.*) https://%1/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule (.*) http://%1/$1 [L,R=301]
任何帮助将不胜感激