redirect

A

Andie

Hello.

How do I redirect a page back to the orginal sending page.

I have a script that checks to see if a user is logged in and if he.she
isn't then it redirects them to a loging page, one login has been checked
and process, how do I redirect them to the original page.

--
To reply, remove "TRASH" from email address

Thanks,

Andie
 
A

Adrian Forbes - MVP

On your page that checks the logon;

if NotLoggedOn
Response.Redirect "logon.asp?return=" &
Server.URLEncode(Request.ServerVariables ("SCRIPT_NAME"))
end if

In logon.asp;

....code to logon the user...
response.redirect Request("return")

That is the general idea anyway.
 
R

Randy Rahbar

I have a script that checks to see if a user is logged in and if he.she
isn't then it redirects them to a loging page, one login has been checked
and process, how do I redirect them to the original page.

You could append the name of the page onto the redirect as a querystring.

Use request.servervariables("script_name") to get the name of the page
current page. It'd work something like this...

If UserNotLoggedOn
response.redirect "login.asp?r=" &
request.servervariables("script_name")
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top