我尝试将www.example.com请求重定向到https://example.com,但无法执行此操作。我正在使用apache 2服务器。我在000-default-le-ssl.conf中使用的示例代码
RewriteEngine on
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /webSocket(.*) ws://127.0.0.1:8080/webSocket$1 [P,L]
ProxyPreserveHost On
ProxyPass "/" "http://127.0.0.1:8080/"
ProxyPassReverse "/" "http://127.0.0.1:8080/"
我在这里缺少什么?