NYCPHP Meetup

NYPHP.org

[nycphp-talk] Switching Forth and Back Between HTTP and HTTPS

Michael B Allen ioplex at gmail.com
Mon Aug 11 12:06:36 EDT 2008


On Mon, Aug 11, 2008 at 3:18 AM, inforequest <1j0lkq002 at sneakemail.com> wrote:
> John Campbell jcampbell1-at-gmail.com |nyphp MAIN ONE dev/internal group
>>> Why is that exactly? I think I agree with you, but I just want to make
>>> sure I know why 301 would be better.
>>>
>>>
>>
>> The short answer is, 301 passes google page rank, 302 does not.
>>
>> -John C
>>
>
> I'm not sure page rank is an issue here, as you probably want to restrict
> search engines from spidering/indexing your secure pages (especially any
> shopping cart stuff that would make for meaningless duplicate junk). If
> you've told the search engines that https is off-limits, then who cares what
> sort of redirect you use?

But I think that's a different issue that should be dealt with using
different methods (e.g. robots.txt). Someone might want crawlers under
HTTPS. It's not likely. But it's possible.

Conceptually a 301 means "the resource you're trying to access is
actually invalid and is represented by the following resource
instead".

So the HTTP to HTTPS transition would be much better characterized by the 301.

The 302 is better for things like redirects after form posts. For
example, you might access the route /account/logon and get a valid 200
response that presents a form and then submit that to the same route
and get a 302 to a different page.

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/



More information about the talk mailing list