Update htaccess

This commit is contained in:
edsea
2024-12-26 01:25:09 +01:00
parent 096a23a8b1
commit d0a59cd6b6

View File

@@ -1,7 +1,13 @@
RewriteEngine On RewriteEngine On
# Force HTTPS (redirect HTTP to HTTPS)
RewriteCond %{HTTPS} off RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect www to non-www (if you want to remove www)
RewriteCond %{HTTP_HOST} ^www\.(example\.com)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/index\.php[\s?/] [NC] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/index\.php[\s?/] [NC]