Webmaster Forum

Webmaster Forum (http://www.v7n.com/forums/index.php)
-   Coding Forum (http://www.v7n.com/forums/forumdisplay.php?f=16)
-   -   Search Engine Friendly Redirect - 301 (http://www.v7n.com/forums/showthread.php?t=34971)

Rezo 08-05-2006 01:17 AM

Search Engine Friendly Redirect - 301
 
A 301 redirect is executed server-side which means that the visitor is never aware that they have been redirected, there is no time delay like with javascript.

To use the following PHP code you must change the file extension of the file you will be using to index.php instead of index.html.
Now put the following code into your new index.php page, put ONLY this code, no need for <head>, <body> or any other tags.
Change www.yourname.com/page.html to the url the page will be redirecting to.



PHP Code:

CODE     
<?php
header
("HTTP/1.1 301 Moved Permanently"); 
header("Location: yourname.com"); 
exit(); 
?>



All times are GMT -7. The time now is 08:46 PM.

3.8.7