Just to compare two of the different ways to effectively do a proper redirect...
PHP:
(old.php)
<? header ('HTTP/1.1 301 Moved Permanently'); header('Location: http://kevinsmithdesigns.com/new.php'); exit; ?>
.HTACCESS
Redirect 301 /old.php http://www.kevinsmithdesigns.com/new.php
--------------
I much prefer .htaccess so you can delete old.php and keep track of all redirects via one file (.htaccess).
.htaccess is also probably the safest way to redirect (if you're the SEO conscious type)
This entry was posted
on Tuesday, June 3rd, 2008 at 6:19 pm and is filed under Blog, PHP, WebDev.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Get a Trackback link
No Comments Yet
You can be the first to comment!
Leave a comment