|
|
 |
Re: FN-FORUM: Any way to detect where a user has been redirected from in PHP?
date posted 1st November 2007 19:03
On Thursday 01 November 2007 19:10:57 Anthony Cartmell wrote:
> > header('Location: login.php?from=);
>
> $_SERVER['REQUEST_URI'] would be more accurate. This would leave off the
> ".php" if you don't use that in your URLs, and would include any query
> vars.
>
> It might be worth doing an urlencode() on the request URL, as I think PHP
> will have urldecoded() it for you when putting it into the $_SERVER array.
>
> The Location header should have an absolute path, so you need
> http://$_SERVER['HTTP_HOST'] and stuff in there too.
Yeah yeah yeah. When people start paying me for the stuff I post here, I'll
start making sure that it's debugged and working.
|
 |
|