search
301 redirect using PHP
Filed in archive SEO by noel on May 10, 2006
301 redirect using PHP
If you read my previous post about duplicating your main page, here's a solution about doing a 301 redirect from http://www.yourdomain.com/index.php to http://www.yourdomain.com.

This one is contributed by a friend of mine Benj of actiononline.biz

This is a 301 redirect using PHP program.

<?
$_SERVER[HTTP_HOST] = strtolower($_SERVER[HTTP_HOST]);
if($_SERVER[HTTP_HOST]=="actiononline.biz" or
$_SERVER[REQUEST_URI]=="/index.php") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.actiononline.biz");
exit();
}
?>



Permalink: 301 redirect using PHP
Tags: using  search  engine  redirect  google  search+engine  redirect+using  search+engines 
Trackback: http://publish.creative-weblogging.com/publish/mt-tb.pl/21780
img Addthis img Ask img Blinklist img del.icio.us img Digg img Fark img Facebook img Google img Lycos img Ma.gnolia Add this page to Mister Wong Mr Wong img Netscape img Netvousz img Newsvine img Reddit img StumbleUpon img Slashdot img Tailrank img Technorati img Wink img Yahoo

Vote for 301 redirect using PHP:

  • Currently 9.20/10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Rating: 9.20 out of 5 vote(s) cast.
Subscribe
Share It
RSSrss
See all blog subscribe options
Google google
What is RSS?
Yahoo! yahoo
Addthis Subscribe using any feed reader!
Bloglines Bloglines
Newsletter

TwitterFollow us on Twitter!