In the include that checks if the user is logged in:
If Session("loggedin") = "" Then
Response.Redirect "login.asp?r=" &
Server.URLEncode(Request.ServerVariables("URL") & Request.Querystring)
End If
login.asp:
<input type="hidden" name="redirect" value="<%=Request.Querystring("r")%>">
On the page that validates login:
sRedirect = Request.Form("redirect")
If sRedirect = "" Then sRedirect = "yourdefaultpage.asp"
Untested
Ray at work
"shank" <sh***@tampabay.rr.com> wrote in message
news:uG**************@TK2MSFTNGP09.phx.gbl...
I have a few pages that require login to access. Assuming a user clicks a
link containing a variable trying to access a password protected page.
That user is redirected to the login page. After login, he's brought to a
"logged in" page. How do I retain the original link he clicked and instead of
redirecting to a logged in page, he's redirected to the page he originally
requested?
(hope that makes sense...)
thanks