|
Written by Administrator
|
|
Monday, 02 June 2008 19:01 |
|
Have you ever wondered how to get rid of the default Joomla 404 page and display a custom page that shows links or search results, so that your visitors can navigate to other pages with out feeling lost? Well, I have and I was googling a bit and found out the following: You can replace the above page with a custom page that looks exactly the same as the rest of your website. Here is what you have to do: - Create a new article page that you want to display for your users when they bump into 404 error. Please have a look on this website to get some inspiration how your 404 page should look like.
http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded/
- Now, in your “template” directory create a file called “error.php” and add the following code
<?php defined( '_JEXEC' ) or die( 'Restricted index access' ); if (($this->error->code) == '404') { header('Location: ' . $this->baseurl . 'my/404/article/page/url'); exit; }
- “my/404/article/page/url” is the url of your 404 article page. Replace it with the new article page that you have just created.
- Now is testing time: Navigate to any page in your website and from the url of the page delete something and try to reach that location, your new error page should popup up.
|
|
Written by Administrator
|
|
Saturday, 31 May 2008 16:01 |
I assume you are using XAMPP (basic package) version 1.6.6a on windows as your server. Here is what you should do:
- In your Joomla control panel or from top menu click on the Global configuration
- On the Global configuration page click on “site” tab. There, you will find “SEO Settings”
- Click yes on the radio buttons for “Search Engine Friendly URLs” and “Use Apache mod_rewrite”
- Now you have to go to your Joomla website root folder and find a file name called “htaccess.txt”
- Since windows explorer won’t let you rename “htaccess.txt” to “.htaccess”, you have to do this from dos prompt.
- Open dos prompt, change directory to your Joomla website root directory and execute this command
ren htaccess.txt .htaccess - Now make the following addition into “httpd.conf”. the file is located here “<Drive>\xampp\apache\conf” . Find the following section
<Directory "<Drive>/xampp/htdocs"> … </Directory> And add the following line Options FollowSymLinks
- Now find the following line in “httpd.conf”
“LoadModule rewrite_module modules/mod_rewrite.so” Remove “#” from the beginning of the line if it exists
- Save your “httpd.conf” and your ready to use SEF URL on your Joomla website.
|