| Handling 404 Redirection in Joomla |
|
To make 404 error redirection more complete you will need to turn on Joomla's SEO. I have step by step instructions on how to do this, please read Basic SEO for Joomla. Awstats on 404 statistics. If you don't deal with your 404 errors look at the next three examples to see how joomla, hostgator, and ixwebhosting deal with it. You will notice it is not too pretty and you will probably have to agree you would not want your site viewers to see these pages.
This is what Joomla will display in the viewers browser for a 404 error.
Another example showing how a hosting service will deal with a 404 error.
And yet another host 404 error catch page
Here is a quick tutorial on how to fix this problem. There are two ways you can go. The first would and simplest would be to redirect all 404 errors back to your home page. The Second would be to redirect the 404 error to a specific article on your website. 1) Copy the file templates/system/error.php to your default template location templates/<template-name>/error.php using either your hosts file manager or with a FTP client such as FileZilla. 2) Open error.php for edit Change this original code near the top of the file // no direct access To this (add the stuff in red). Don't forget to change <your-url> to your web site name! // no direct access Finally at the very bottom of the file add the following <?php } ?>
3) Your done. Now you will not loose your site viewers to the dreaded 404 error pages. At this point they will be redirected to your home page. If you would like to have them go to a specific article telling the user that the requested page does not exist then continue with the following steps. 4) Create an article in Joomla Note down the Article ID 404 Page not found. The page your looking for does not exist. 5) Modify the error.php to contain the stuff in red. then change <article_id> to the Article ID you would like to show. Also don't forget to modify <your-url> to your sites url. // no direct access |