Joomla remove index php

Learn how to remove index.php from Joomla URLs with an easy-to-follow example.

Removing index.php from Joomla URLs

Joomla is a powerful open-source content management system (CMS) that enables you to easily create and manage a website. It is a great platform for creating a website for your business, organization, or personal use. By default, Joomla URLs have the "index.php" string in them. This makes the URLs look unprofessional and hard to remember. Fortunately, you can easily remove the "index.php" from Joomla URLs.

Step 1: Enable URL Rewriting

The first step is to enable URL rewriting in your Joomla website. To do this, go to your Joomla administrator page and navigate to "System > Global Configuration > SEO Settings". There you will find an option to enable URL rewriting. Once enabled, your Joomla URLs will no longer contain the "index.php" string.

Step 2: Rename the htaccess.txt File

Next, you need to rename the "htaccess.txt" file in your Joomla root directory to ".htaccess". This is a hidden file that is used by Apache to control access to your website. This file contains the necessary rules that enable URL rewriting in Joomla.

Step 3: Configure the .htaccess File

Once you have renamed the "htaccess.txt" file, you need to configure the ".htaccess" file. This file contains the necessary rules that enable URL rewriting in Joomla. To do this, open the ".htaccess" file in a text editor and replace the existing code with the following:

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
This code will enable URL rewriting for your Joomla website. Once you have added this code to the ".htaccess" file, save it and upload it back to the Joomla root directory.

Step 4: Test the URL Rewriting

The final step is to test the URL rewriting in your Joomla website. Go to the front-end of your website and check if the URLs have been changed and the "index.php" string is removed. If everything is working correctly, then you have successfully removed the "index.php" from Joomla URLs. Removing the "index.php" from Joomla URLs is a simple process that can greatly improve the look and feel of your website. It makes the URLs easier to remember and gives your website a more professional look.

Answers (0)