Skip to main content
Participating Frequently
March 2, 2010
Answered

Log-in page that brings you back to where you were

  • March 2, 2010
  • 2 replies
  • 845 views

Hi,

I am trying to have a log in page where it brings you back to the page you were on after you log in. In the Log In User window under Server Behaviors, there is a check box that says Go To Previous URL (if it exists). I tried checking that, but it wouldn't let me leave without putting in something in the form above it. Does anyone know what I put there or how to circumvent this issue?

This topic has been closed for replies.
Correct answer bregent

Sorry... I'm pretty new at this. How do I check that and what am I looking for?


Navigate to one of the pages that requires authentication. The authentication script should detect that you are not logged in and redirect you to the login page. Now look at the url and see if the origina page url is embedded in there. Or, just copy and paste the url in the address bar to the forum so we can see.

2 replies

August 17, 2011

I am having a similar issue. I am using the following:

  • Dreamweaver CS5
  • MYSQL
  • phpadmin
  • IIS6.0 websever

I am trying to create a login page that when the user tries to access a restricted page, it doesn't go back to the previous URL when the check box is selected. When I create a LOGIN folder in the root of the website, and create the login.php file I get a PAGE can't be found and for some reason there is an extra login folder in the path on the error screen. ie.. http://www.example.com/login/login/login.php  (note extra login folder, should only be one login folder in path)

if I just put the login.php file in the root of the website, even if I enter in the correct creditials, I still get routed back to the login.php page on error.

see screen shot below of extra login folder added to URL   (click on image to enlarge)

Participating Frequently
March 2, 2010

Put the url where you want the user to go if they were not previously on one of your pages. For example, if the user enters your login page directly then there was not previous url so they need to go somewhere. Use your homepage or anything else that makes sense.

Participating Frequently
March 3, 2010

I tried that, but then it always goes back to homepage no matter where I came from. Here is a screenshot of my Log In User screen:

bregentCorrect answer
Participating Frequently
March 4, 2010

Sorry... I'm pretty new at this. How do I check that and what am I looking for?


Navigate to one of the pages that requires authentication. The authentication script should detect that you are not logged in and redirect you to the login page. Now look at the url and see if the origina page url is embedded in there. Or, just copy and paste the url in the address bar to the forum so we can see.