Blue jean baby, LA lady

22nd June, 2010 - Less than a minute read

Have you ever wanted to redirect your index.php page to yourroot domain? So this:

http://www.mysite.co.uk/index.php

Automatically redirects to this:

http://www.mysite.co.uk/

You have… excellent! Well with the following code snippet for the .htaccess file you can now achieve this:

RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.mysite.co.uk/ [R=301,L]