|
|
 |
Re: FN-FORUM: Any way to detect where a user has been redirected from in PHP?
date posted 1st November 2007 17:39
Thanks, Alex. This is the approach I've taken, as the redirecting is
all done within a function, so I've just inserted the session variable
before the redirect. Brain is farting still from yesterday's
hullabaloo, so I'm annoyed it didn't occur to me before. :/
On 1 Nov 2007 14:57:25 -0000, Alex Townsend [EMAIL REMOVED] wrote:
>
> Personally, I'd recommend using a session variable called something
> like "redirected_from" - that gets added in before the redirect, and
> can be quizzed by the login page.
>
> Alex
> http://www.ozbon.com
>
>
>
> Quoting Ben Nolan [EMAIL REMOVED]
>
> >
> > Hiya,
> >
> > Throughout the site which got smooshed yesterday are a load of
> > header('Location: blah'); redirects which point at the login page.
> > Does anyone know of a way to detect the URL of the page which contains
> > that line? HTTP_REFERER seems only ever to contain the page which
> > pointed at the page which redirected you, rather than the page itself.
> >
> > I'm asking this 'cause I'd rather not rewrite all the references to
> > Location: blah to include the calling URL in a get query. :/
> >
> > Thanks,
> >
> > Ben.
> >
> > --
> > Freelancers, contractors earn more with Prosperity4
> > Call 0870 870 4414 or visit www.prosperity4.com
> > and benefit from Inland Revenue approved expenses today.
> >
> > To advertise here: http://www.freelancers.net/advertising.html
> >
> >
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
> |
 |
|