Joomla Common Errors with SEF URLs and How to Fix Them
Joomla Common Errors is something many users encounter while working with this popular CMS platform. Joomla makes it easy to create and manage websites, but even a simple edit placed in the wrong section may cause major issues. Below is an example of one of the most common errors and its causes.
Joomla Common Errors 404 Message
While the homepage of the website loads perfectly fine, upon clicking on a menu item, a 404 error message appears. The causes of this error message are as follows:
- Search Engine Friendly (SEF) URLs - The 404 error message in a Joomla site is sometimes caused by the Search Engine Friendly (SEF) URLs. This is commonly located in the configuration.php file. If you have enabled the SEF URLs without proper .htaccess configuration, expect a 404 error to appear. You can either disable or enable the SEF URLs.
Example of a search engine-friendly URL:
https:www.exampledomain.com/someexamplepage
Example of a non-search engine-friendly URL:
http://www.exampledomain.com/index.php?option=com_content&view=category&layout=blog&id=76&Itemid=74
Enabling the SEF URLs
If you want to use the SEF URLs, you need to ensure that you have renamed the .htaccess.txt file in the Joomla installation to .htaccess. It is also imperative to confirm that the Global Configuration for the installation of Search Engine Friendly URLs and Use
You can also enable the SEF URLs in the configuration.php file. Simply access the configuration.php file in the Joomla installation's document root then look for the following lines:
public $sef = '0';
public $sef_rewrite = '0';
public $sef_suffix = '0';
Change the value from '0' to '1' to enable SEF URLs. Make sure to check the value of this line. The value needs to match your site URL:
var $live_site = 'http://example.com ';
Disabling SEF URLs
If you don't want to use SEF URLs, ensure that the Search Engine Friendly URLs and Use Apache mod_rewrites are both set to "No."
You can also disable the SEF URLs in the configuration.php file. Just simply access the configuration.php file in the Joomla installation's document root, then look for the following lines:
public $sef = '1';
public $sef_rewrite = '1';
public $sef_suffix = '1';
Change the value from '1' to '0' to disable SEF URLs. Leaving the $live_site$ as unspecified will let any domain resolve to the document root of the Joomla installation to be used as the Site URL. See the example below.
var $live_site = ' ';
Review
This guide explains Joomla common errors with SEF URLs, particularly 404 issues. It provides clear steps to enable or disable SEF URLs through .htaccess and configuration.php settings, helping users fix errors and manage Joomla sites more effectively.