|
Posted by qwert on 09/19/05 13:27
qwert schrieb:
> Neil Trigger schrieb:
>
>> Thanks Steve, the generated link was
>> http://www.magic2k.com/errorpages/404.php and the expected link is
>> almost irrelevant as it does it on ALL links...
>>
>> The expected link should be the last page that the user visited before
>> getting an error, with the exception of some of the login pages where
>> I defined $not_here='yes'; so that it disables the writing of the
>> address to the session.
>>
>> The session definition worked fine until I needed to login, but it
>> seems that although it's still writing it (and I don't know why it
>> should be still writing) it seems to be hitting my htaccess file to
>> get the error page link above.
>>
>> I think it might have something to do with skipping the writing of the
>> session but i don't know why.
>>
>> I think this will be a really cool script once it's bug free.
>>
> so to summarize (correct me if i'm wrong):
>
> If a visitor on your site clicks on a link to an article, you check (in
> the articlescript) if this visitor is a logged in user ... if he is, you
> display the article but if he isn't, you redirect him to the loginpage
> ... after he has logged in, you want to provide a link to this visitor
> which takes him back to the article he has requested in the beginning
> ... right ?
i took a short look at the phpinfo on my server ...
you could use $_SERVER['REQUEST_URI'] (or $_SERVER['HTTP Request']) ...
this variable contains the requeststring, for example
/articles/members/read.php?article_id=137, which you could use together
with $_SERVER['Host'] to construct the full link ...
-----
qwert
[Back to original message]
|