我正在尝试将对我的网站的所有请求从非www重定向到www以及从http重定向到https:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^my-domain\.de [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
现在,我仍然可以打开http://www.my-domain.de,而无需将其重定向到https:// ...
在此先感谢您的帮助!