# Redirect HTTP to HTTPS RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Remove index.php from URLs RewriteCond %{THE_REQUEST} \s/+index\.php[\s?] [NC] RewriteRule ^index\.php$ / [R=301,L] # Route requests to index.php if the file/folder doesn't exist RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [L]