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,, and 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

Options +FollowSymLinks
DirectoryIndex index.php

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

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

For redirecting to

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$$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.

  • Joomla Beginner

    Thank you so much for this informative blog post. I was just wondering how to redirect index.php to root in Joomla 1.5…

  • Pepe


    I think you also need to add

    RewriteCond %{REQUEST_URI} !^/administrator

    if not the administrator’s index.php would also be redirected and not work?

    many thanks

  • jamesrobert21

    Nice Blog! Joomla experts can be your ultimate guide for Joomla service or Joomla template related service.

  • aidenwilliams

    Joomla is generally used to develop several aspects of Joomla module development such as catalogue, e-commerce, estate agency, forum, project management, property rental, comments, news, reviews, calendar etc.


    You ought to take part in a contest for one of the greatest blogs on the net.
    I’m going to highly recommend this blog!

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.