How-To - Redirect 404 to index page via PHP
I’ve been working a quirky sub-domain 404 issue and I found a quick and clean redirect script. Instead of a nasty 404 page you can redirect the web request to the index page. I found the helpful script here: http://css-tricks.com/how-to-redirect-indexhtml-to-indexphp/
I deleted whatever text was in 404.php and replaced it with:
<?php
header( 'Location: http://www.redirect-location.com' );
exit();
?>
Worked like a charm for me!
No Comments »
RSS feed for comments on this post. TrackBack URL