How To Remove Index.php From The url
I often get faced with this problem when developing a new Joomla site so I decided to write this short article as an easy reminder and hopefully to help others struggling to figure it out.
The index.php is left there by the CMS because without prior knowledge of the server configuration hosting the site it is impossible to modify the necessary files held on the database.
However from the administrator login it is a fairly simple operation.
The problem looks something like this:
I have a site URL http://www.webdesign.pigeontech.com/index.php
See the nasty little index.php in the link? That's what we want to remove so our address looks like:
The url looks a lot neater and more professional
Here are the steps to remove index.php in a Joomla installation:
We begin in the Joomla Administration Panel under Site > Global Configuration
- Under SEO Settings Change Search Engine Friendly URLs to YES
- Change Use URL Rewriting to Yes
- Click Save
The next step is to rename the htaccess.txt file that came with the installation to .htaccess This requires an FTP client. File Zilla is my ftp client of choice but you can use anyone you choose.
Navigate to the root directory of your installation. In there you will find a file called htaccess.txt
This needs to be renamed .htaccess
It's not possible in Windows to simply use the right click rename function because the file extension can't be changed. Instead follow these steps:
- copy the htaccess.txt file from the root directory to a location on your computer
- Open htaccess.txt in notebook
- Save As .htaccess and change file type to All Files
- copy the new .htaccess file back to the root directory on your webserver and delete the old htaccess.txt file
That is it. Open up your website and check the links have no index.php in the URL.
If you found this article useful please remember to Like us on Facebook