Options -MultiViews RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] RedirectMatch 302 ^/$ /index.php/