RewriteEngine On # ๐Ÿ” Force HTTPS RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # ๐Ÿงผ Clean URLs (.php extension) RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php [L] # ๐Ÿšซ Remove trailing slashes RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # ๐Ÿง  Prioritize ACE index DirectoryIndex index.php # ๐Ÿ” Redirect system-lock file to PHP Redirect 301 /mainframe/system-lock.txt /mainframe/system-lock.php