The variable $_SERVER['REQUEST_URI'] contains the URL used to request the current page, so you could check that at the top of your PHP script (before any output is sent) like so: if ( $_SERVER['REQUEST_URI'] == '/index.php' ) { header('Location: http://www.site.com/'); exit; } PHP: I think that's right, but I haven't tested the code.
Or, using htaccess: RewriteEngine on RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php3\ HTTP/ RewriteRule ^index\.php3$ http://www.domain.co.uk [R=301,L] Code (markup):