Is it possible to remove "index.php" from the address bar?
index.php
4 replies
Hi Boiron,
Yes, this is possible. Here's how to do it:
-
Go to System → Global Configuration → Site and under SEO Settings set:
- Search Engine Friendly URLs: Yes
- Use URL Rewriting: Yes
-
In your site's root folder, rename htaccess.txt to .htaccess (via FTP or your host's file manager).
-
Clear your site cache (System → Clear Cache) and your browser cache, then test.
A few notes if it doesn't work right away:
- If you get a 500 error after renaming the file, your host may not have
mod_rewriteenabled — worth checking with them. - If you're on Nginx rather than Apache,
.htaccesswon't apply and you'll need equivalent rewrite rules in your server block instead. - Double-check the Global Configuration change actually saved, since a stale cache can make it look like nothing happened.
Let us know your server type (Apache/Nginx) if it's still not working after this.
Thanks
Extra step
- Plugins > Plugins: System - SEF > Strict handling of index.php: Yes and enable plugin.
It will remove 'index.php' if a URL still contains it and redirect incoming requests with 'index.php' to the version without the 'index.php'.
Thank you for the explanation. It works perfectly. Thanks for taking the time to reply.
Apologies for the writing; I am French, and this is a translation.
Best regards,
Jean-Paul
Pas de problème, nous sommes ravis d'avoir pu vous aider, même si la question portait uniquement sur Joomla.
Please click accept answer, merci
Best regards, Paul