A 301 redirect is executed server-side which means that the visitor is never aware that they have been redirected, there is no time delay like with javascript.
To use the following PHP code you must change the file extension of the file you will be using to index.php instead of index.html.
Now put the following code into your new index.php page, put ONLY this code, no need for <head>, <body> or any other tags.
Change
www.yourname.com/page.html to the url the page will be redirecting to.
PHP Code:
CODE
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: yourname.com");
exit();
?>