On my site the homepage is accessible by all. The other pages need a password.

When a visitor clicks a link, they get redirected to the login page instead
of the page that they want to see. That part is under control.

If they provide the right password, they need to be sent to the page that
they clicked. How do I do that?

I'm using ASP and Access.

Re: remembering the link that was clicked by McKirahan

McKirahan
Thu Dec 02 04:37:41 CST 2004

"slim___shady" <slim___shady@discussions.microsoft.com> wrote in message
news:2EAF65C5-4C62-4642-8CB1-FB8EB1C44FAD@microsoft.com...
> On my site the homepage is accessible by all. The other pages need a
password.
>
> When a visitor clicks a link, they get redirected to the login page
instead
> of the page that they want to see. That part is under control.
>
> If they provide the right password, they need to be sent to the page that
> they clicked. How do I do that?
>
> I'm using ASP and Access.

So you have a hyperlink on a page which, when clicked, determines if the
user is logged in and, if not, takes them to a log in page. You want the
log in page to know which hyperlink the user clicked so that, after logging
in, they will be directed there. Correct?

One way is to always call the log in page with the url (or relative page) of
the hyperlink in the querystring; such as:

<a href="login.asp?page.htm">click me</a>

then use "Response Redirect Request.QueryString()" in the "login.asp" page
after or if the use has logged in.

Do not rely on HTTP.REFERER as AntiVirus software (and XP SP2?) often block
it.




Re: remembering the link that was clicked by Tim

Tim
Thu Dec 02 21:10:00 CST 2004

Modify your "login check" code on the each protected page to pass the URL of
the protected page as a parameter when it redirects non-logged-in users to
the login page (or set a session value to the URL). When the login page
find this parameter (or a value is there in the session variable) then the
login page (on success) should redirect the user to the originally requested
URL.

Tim.



"slim___shady" <slim___shady@discussions.microsoft.com> wrote in message
news:2EAF65C5-4C62-4642-8CB1-FB8EB1C44FAD@microsoft.com...
> On my site the homepage is accessible by all. The other pages need a
password.
>
> When a visitor clicks a link, they get redirected to the login page
instead
> of the page that they want to see. That part is under control.
>
> If they provide the right password, they need to be sent to the page that
> they clicked. How do I do that?
>
> I'm using ASP and Access.