Home | Services | Portfolio | Company | Contact us | Blog

Blog Menu

October 7, 2009

PHP 301 REDIRECT

Filed under: PHP / LINUX — admin @ 7:08 pm

Written by: TechNut

PHP 301 REDIRECTS are easier than you think and according to Google and other search engines 301 redirects are safe ways to redirect pages that have moved as well as an entire website if needed. Here is the quick way to implement a 301 PHP Redirect safely in your website. For those who are not too familiar with PHP it’s best to remove all HTML in the php file you create.

<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url.com” );
?>


Post to Twitter . Post to Plurk . Post to Yahoo Buzz . Post to Delicious . Post to Digg . Post to Facebook . Post to MySpace . Post to Ping.fm . Post to Reddit . Post to StumbleUpon .