SEO Tip: Safe PHP redirect

Search Engine Optimization Add comments

Search engines are particularly harsh to sites that use hard redirects to another page. If you are using PHP and need to have a page redirect to another location, use this code:

<?php
header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: http://www.newdomain.com/newpage/newurl.htm”);
exit();
?>

Leave a Reply

You must be logged in to post a comment.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in