On 8/10/08, Michael B Allen <[EMAIL PROTECTED]> wrote:
>  if ($scheme) {
>     header('Location: ' . rebuild_url_with_new_scheme($scheme));
>     exit();
>  }


The code above won't always work because if the request is a post
request, the post data will not get passed to the https url.  I think
the http spec says it is supposed to, but in reality the POST data is
not sent to the redirected location.  Maybe the thing to do is throw a
404 if post data is sent to a script that requires ssl.

I would also use a 301 redirect in this case.

-John C
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to