Call: (209) 560-6611

PHP Header 301

Date: April 22, 2012 Author: ang Category: Affordable Web Design Internet Tips Tutorials Tags: , Comments: 0

How to create a 301 redirect using PHP

Create this PHP file, named index.php, with these lines of code at the top, and place it on the server.

 Javascript |  copy code |? 
1
<?
2
Header( "HTTP/1.1 301 Moved Permanently" ); 
3
Header( "Location: http://www.new-url.com" ); 
4
?>

Create a PHP header 301 redirect using just your cPanel

Leave a Reply

Your email address will not be published. Required fields are marked *

Before you post, please prove you are sentient.

What color is fresh snow?

Before you post, please prove you are sentient.

What is 3 times 5?