To configure Joomla’s htaccess file for SEO-friendly URLs, follow these steps:
- Log in to the Joomla administration panel.
- Go to the Global Configuration section.
- In the Site tab, scroll down to the SEO Settings section.
- Set Search Engine Friendly URLs to “Yes.”
- Set Use URL rewriting to “Yes.”
- Save the changes.
- Access your website’s root directory using an FTP client or cPanel File Manager.
- Locate the .htaccess file, and download a copy of it to your computer as a backup.
- Open the .htaccess file in a text editor.
- Look for the line that reads “# RewriteBase /”.
- Uncomment this line by removing the “#” symbol at the beginning of the line.
- Replace “/joomla” with the name of your website’s root directory, if necessary.
- Add the following lines to the .htaccess file:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
- Save the changes to the .htaccess file.
- Upload the modified .htaccess file back to your website’s root directory.
With these changes, your Joomla site will now use SEO-friendly URLs that are more easily crawled and indexed by search engines.