Redirecting index.php to root in Joomla 1.5

Its very important that the homepage of the website is accessible through one URL only. For example, a typical joomla site would be accessible by domainname.com, www.domainname.com, domainname.com/index.php and www.domainname.com/index.php. If you are using frontpage component on the homepage, you may have an additional URL for homepage.

This way, the power of backlinks and google PR is distributed across several URLs. This can be easily taken care of by using the following code in .htaccess file.

For redirecting /index.php to www.domainname.com:

Options +FollowSymLinks
DirectoryIndex index.php

RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.domainname.com/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


For redirecting domainname.com to www.domainname.com:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domainname.com [nc]
rewriterule ^(.*)$ http://www.domainname.com/$1 [r=301,nc]


Once you have done this, you can check the redirection using a fantastic redirect check tool I can across. This tool will provide all possible URLs for your homepage along with the response code. The response code of 200 which is an OK response should be returned by just one URL.

Custom 404 page in Joomla 1.5

Joomla 1.5 has a default 404 error page which is devoid of the main website theme. It looks something like this:

404_error



In SEO perspective, the website should have a 404 error page with proper links to the site. According to Google SEO guide, avoid using a design for your 404 pages that isn’t consistent with the rest of your site.

To change the default 404 error page in Joomla 1.5 is quite easy. Just follow these easy steps:

Create a normal article with some message to the users who have arrived on the error page. Publish this article as a menu item and grab the URL for the article. It will be like:
http://www.joomla.in/index.php?option=com_content&view=article&id=122

Now you need to edit the file which contains the code for 404 error page in Joomla. Open the file templates/system/error.php in any editor. Just below this line: defined( ‘_JEXEC’ ) or die( ‘Restricted access’ ); add the following code:

if (($this->error->code) == ‘404′) {
header(’Location: ‘ . $this->baseurl .’index.php?option=com_content&view=article&id=122′);
exit;
}
?>


Replace the old error.php file with this one.

Now you can open any non-existent URL on your website like http://www.domainname.com/non-existent-url.html and you will find that the custom error page has opened.

Managing Page Title with Joomla 1.5

Proper Page titles are considered as one of the important constituents of onsite SEO. Basically, the page title should be comprised of proper keywords related to that specific web page. Lot of websites till today use their company name as the page title for all the pages of the website. It’s not advisable to use only your business name in the page title, unless it is the only keyword for visitors to search for.

Now in Joomla 1.0, the Page Title was populated automatically based on the title of the content page. In Joomla 1.5, there is an option for managing the Page Title so that it can be made different from the title of the content page. For this follow these easy steps:

  1. Create a content page
  2. Add a menu item “Article” and attach that content page with it.
  3. On the menu item detail page, click open the Parameters (System) from the right sidebar.


    pagetitle_joomla151
  4. Add your Page Title here and it can be different from the title of the content page.

PS: Do not make the mistake of stuffing the Page Title with unneeded keywords. Too many keywords lessen the significance of page title. According to Google SEO guide for Page Title:

  • Accurately describe the page’s content
  • Create unique title tags for each page
  • Use brief, but descriptive titles