Home   Help Login Register  
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Search
WooThemes - Quality Themes, Great Support
Pages: [1]   Go Down
Print
Topic: 301 Redirect using PHP - Permanent Redirect HTTP 301  (Read 582 times)
0 Members and 1 Guest are viewing this topic.
« on: August 10, 2008, 03:30:43 AM »
Kevin Offline
Newbie

View Profile
*

iTrader: 2
Posts: 72



You can set 301 redirection (Permanent Redirection) using the below PHP code. It helps to search engines to redirect to the new web site:

Code:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.location-to-new-web-site.com" );
?>
Kevin
Logged
« Reply #1 on: December 14, 2008, 12:40:47 AM »
muckle.martin Offline
Newbie

View Profile WWW
*

iTrader: 0
Posts: 5



Thanks for sharing. Is HTTP/1.1 necessary? I think a Location header would be good enough. Because this might also work with HTTP/1.0 clients.

Quote from: "Kevin"
You can set 301 redirection (Permanent Redirection) using the below PHP code. It helps to search engines to redirect to the new web site:

Code:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.location-to-new-web-site.com" );
?>
Kevin
Logged
Pages: [1]   Go Up
Print
Jump to:  

Untitled Document
(c) 2009 HELM, WHM, cPanel, ASP, .Net development, PHP, MySQL, MSSQL Server, SEO support forum
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Forum style designed by PixelSlot
Sitemap - XML Sitemap