PHP redirect old URL to new URL

Submitted by:Tim Kelly

Date added:01 April, 2013

Category:PHP

PHP code example for redirecting from old URL to new URL

Tags: php redirect

Code Snippet:

<?PHP
header("HTTP/1.1 301 Moved Permanently");
header ('Location: http://www.newsite.com/newpage.html');
exit (); ?>
 
 

Comments