Forum Moderators: open

Message Too Old, No Replies

Will SE follow PHP redirect?

         

guillermo5000

9:54 pm on Jul 14, 2005 (gmt 0)

10+ Year Member



I have a page that I'm temporarily redirecting with a bit of PHP code. Will search engines follow that redirect? Thanks all.

[edited by: guillermo5000 at 9:54 pm (utc) on July 14, 2005]

jatar_k

9:54 pm on Jul 14, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



yes they will treat it as a 302, if memory serves that means they list the original url not the redirected url

HNichols

10:24 pm on Jul 14, 2005 (gmt 0)

10+ Year Member



Does it matter what type of php redirect you use?

jatar_k

10:29 pm on Jul 14, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



temporary means that the redirect is only there for now and the original page should stay in the index

permanent redirect means the original page has moved forever to a new location and that new location should be in the index instead

guillermo5000

10:41 pm on Jul 14, 2005 (gmt 0)

10+ Year Member



I didn't actually specify any sort of error code. By temporary, I just meant that I intend to remove the redirect code eventually.

I guess my question could of been better asked like this:

Since the PHP redirect is performed server-side, will a search engine be redirected just like the other normal visitors to the page?

Thanks again.

jatar_k

10:53 pm on Jul 14, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



yes, they will follow it

the header function issues a 302 by default

The second special case is the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless some 3xx status code has already been set.

from
[php.net...]

guillermo5000

11:04 pm on Jul 14, 2005 (gmt 0)

10+ Year Member



Cool! Thank you very much!