I am setting up a Magento website which is not inside of any sub-directory such as /shop.
Before every URL on the website had the index.php append next to the domain name, for e.g the admin panel was example.com/index.php/admin.
I enabled Mod_rewrite in Magento's admin panel and added an .htaccess file with the following to make sure that example.com/admin actually goes to the admin panel and so on. It does work.
Here's the htaccess configuration:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
The problem is that when I manually type example.com/index.php/admin it takes me to the admin panel as expected but the URL stays that, I expected it to redirect to the right URL which is example.com/admin but I am not able to.
Do I have to add any configurations to the htaccess or is it Magento related?