301 Redirect with PHP
Redirection is common method to retrive the lost traffic, we canredirect old trafffic to the new one. Usually this can be done using .htaccess but if that can’t be done, PHP redirection is the alternative.
Code:
<?
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.new-url.com" );
?>
Why 301 redirect? Â 301 redirection is called permanent redirection, so your new URL will be indexed by google not your old one.
301 Redirect – How to create Redirects.
301 Redirect with PHP is posted on July 7th, 2009 by buchin. This post is filed under: PHP, PHP Redirection .
Leave a Reply