.htaccess를 사용하여 www가 아닌 https 및 모든 색인을 404 (이전 규칙 포함)로 리디렉션하려고했습니다. 이것이 최종 결과이지만 의도 한대로 작동하지 않습니다. 내가 도대체 뭘 잘못하고있는 겁니까?.htaccess는 https가 아닌 www로, 404는 색인으로 리디렉션
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,QSA,NC,L]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
ErrorDocument 404 https://mydomain.com/
완벽하게 작동합니다! TY –
다행 이니 다행입니다. – anubhava