Re: Header won't redirect
| From: | PHP | Date: | Fri, 19 Sep 2003 14:57:45 +0000 |
| Subject: | Re: Header won't redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163151@lists.php.net to get a copy of this message | ||
Jay, good guess, but wrong! While register_globals does equal off, I am
using $_GET['pagename'] to assign the value to $pagename before the snippet
of code that I sent. Sorry I didn't mention that earlier. I tried putting
the _GET in my header redirection directly, but that didn't help. Any other
ideas? Anyone else have an idea?
Thanks,
Jonathan Duncan
"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B01AFA83C@nemesis...
[snip]
This used to work before I upgraded my PHP.
[/snip]
Let me guess, you upgraded without actually reading the README or update
notes. I am going to guess that register_globals = off in php.ini. You
can either fix the variables $_GET['pagename'] or turn RG back on.
Jay Blanchard
"Jonathan Duncan" <jonathan@nacnud.com> wrote in message
news:20030919131219.28954.qmail@pb1.pair.com...
> This is code that I have in my index that check whether or not SSL is
being
> used when accessing certain pages and if not then it redirects to the same
> address but with SSL.
>
> if ($pagename=="login" || $pagename=="signup" ||
> $pagename=="checkout") {
> if (!$HTTPS) {
> //header("Location:
>
https://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']."?pagename=$pagename");
> exit;
> }
> }
>
> This used to work before I upgraded my PHP. Now when I click on a link
that
> matches my SSL checker it just hangs:
>
> http://www.routerbitworld.com/index.php?pagename=checkout
>
> If I change the header to redirect to a location without any variable
> directive like this
>
> http://www.routerbitworld.com/index.php
>
> ...works fine. Why can't I send a variable this way?
>
> Thanks,
> Jonathan Duncan