Apr 13, 2006
The preferred way of redirecting a page that has moved is by a 301 redirect. In PHP, 301 redirects are not the default (a 302 redirect is the default). Whenever you move a visitor to a new location, you should use the PHP 301 redirect, which involves one extra line of code.In PHP, a 302 redirect is done as follows...
header('location: http://www.example.com/new-page.php');
By doing a 302 redirect, this will move the visitor from the old page to the new page, but any link or PR value will not follow the redirection. Usually, when you are moving a page, you want the old page to disappear and all links to point to the new page.
Related Articles
- Redirects - the good, the bad and the ugly
- Ferrit SEO their site properly - sort of?
- Why don't people use 301 redirects?
- That trailing slash DOES matter
- PHP redirect function (301 / 302)
<< SEO Articles index < Optimizing Webmaster Credits | Titles for bricks and mortar businesses >
Comments
XTRaze - Jan 11, 2007
Is it SEO ?
Working fine.
Working fine.
jack - Mar 23, 2007
in the event of redirect www.old-domain.com to www.new-domain.com with the php 301 redirect is it needed in that php file to note in there permanantly moved or does the search engine not even see anything in that file?
newbie question
newbie question

Post Comment
We welcome comments on this article, provided they have something to contribute. Please note that all links will be created using the nofollow attribute. This is a spam free zone. HTML is stripped from comments, but BBCode is allowed.











Anil Kumar Singh - Sep 22, 2006