|
|
 |
Re: FN-FORUM: Any way to detect where a user has been redirected from in PHP?
date posted 1st November 2007 14:25
On 01/11/2007 15:04, Dom Latter wrote:
> On Thursday 01 November 2007 15:48:18 Ben Nolan wrote:
>> 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. :/
>
> One line of bash script will do it, if you want to be really smart-arsed,
> to change all of them to this:
> header('Location: login.php?from=);
>
a global search and replace in any decent text editor could do it too.
(don't forget to escape $_SERVER['PHP_SELF'])
|
 |
|