Home
Help
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search
Advanced Search
HELM, WHM, cPanel, ASP, .Net development, PHP, MySQL, MSSQL Server, SEO support forum
Design and Development
Programming
PHP
301 Redirect using PHP - Permanent Redirect HTTP 301
Pages: [
1
]
Go Down
« previous
next »
Topic: 301 Redirect using PHP - Permanent Redirect HTTP 301 (Read 582 times)
0 Members and 1 Guest are viewing this topic.
301 Redirect using PHP - Permanent Redirect HTTP 301
« on: August 10, 2008, 03:30:43 AM »
Kevin
Newbie
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
Re: 301 Redirect using PHP - Permanent Redirect HTTP 301
« Reply #1 on: December 14, 2008, 12:40:47 AM »
muckle.martin
Newbie
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
WebHosting Related
-----------------------------
=> cPanel/WHM
=> HELM and other Hosting control panels
=> Email Management Software & Email Clients
=> Domain Registration
=> VPS Hosting
=> Dedicated Server Hosting
=> Script/software installation and upgrade
=> Other Web Hosting Stuff
-----------------------------
Design and Development
-----------------------------
=> Programming
===> ASP
===> PHP
===> .NET Development
=> Site and Server Administration
===> Apache
===> Microsoft IIS
===> Security
=> Databases
===> MySQL
===> MSSQL server
===> MS Access
=> HTML, CSS and Website Design & Programming
=> Forums and Content Management
-----------------------------
Operating System
-----------------------------
=> Windows
=> Linux
-----------------------------
Search Engines
-----------------------------
=> Google
=> Yahoo
=> MSN
=> Other Search Engines
=> Search Engine optimization and Link Exchange
-----------------------------
Payment Gateways
-----------------------------
=> 2Checkout
=> PayPal and PayPal Manager (Verisign)
=> Other Payment Processors
-----------------------------
General
-----------------------------
=> How Tos
===> SmarterMail and other Email Servers
===> Linux
===> Windows
===> cPanel/WHM
===> HELM and other Hosting Control Panels
=> Free Services
=> Paid Services
=> Marketplace
===> Advertising Sales & Affiliate Programs
===> Forex Trading (Currency Trading)
-----------------------------
NEWS, Alert and Entertainment!!!
-----------------------------
=> Introduce yourself
=> Suggestions
=> General Chat
=> Contests
Untitled Document
Home
|
Forum
|
Blog
|
Wordpress KB
|
Link Exchange Directory
|
Directory
Link exchange
|
Sitemap
|
Blog Sitemap
|
Privacy Policy