Link to home
Start Free TrialLog in
Avatar of patelajk
patelajk

asked on

Login Issue

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

Thanks

Ajay
Avatar of alexhogan
alexhogan

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.

Or

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.
ASKER CERTIFIED SOLUTION
Avatar of prifre
prifre

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial