This is the content of my .htaccess file.
I want to accomplish two things:
- Remove
index.php
from the CodeIgniter URL; - Force all connections through
https://
HTTPS works fine but index.php
remains in the URL. How can I fix this?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
http
tohttps
rule should be at the top of your htaccess file before all internal rewrite rules.