Login Issue

Posted on 2005-05-16
Medium Priority
Last Modified: 2010-04-25
I have a few secure pages developed using Dreamweaver and ASP vbscript.

At the moment when a user tries to access a restricted page with logging it takes them to the login page. When the user logs in they have to find the page they wanted all over again.

Is there a way so that when a user tries to access a restricted page, it will ask them to login and then redirect them to the page they were originally trying to get into in the first place

Any help would be great


Question by:patelajk

Expert Comment

ID: 14011360
You could do this in a couple of ways...

Using javascript you could use history.go(-1) or history.go(-2), depending on the number of pages back you want to go.  When the page loads again it will check to see if the user is logged in and grant them access.


You could track the page(s) in a session object.  This would allow you to keep resident the page that the user was trying to access before they logged in.  Once they've logged in to the system then you could do a simple redirect based on the session object.

Accepted Solution

prifre earned 250 total points
ID: 14157155
You can use the ASP code..

If IsEmpty(Request.Form("Referrer")) Then
      Referrer = "default starting page"
      Referrer = Request.Form("Referrer")
End If

and somewhere...

if Session("LoggedIn")=true then
        Response.Redirect Referrer
end if

We are using this code - I did not originally write it - but it works... somehow...

with a smile

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question