Copy link to clipboard
Copied
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?

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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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:

Copy link to clipboard
Copied

Copy link to clipboard
Copied
In order for it to work, the authentication behavior needs to pass the page you were on to the login script page. So the first thing to check is to see if the page you want to be redirected back to is embedded in the query string when you are directed to the login page.
Copy link to clipboard
Copied
Sorry... I'm pretty new at this. How do I check that and what am I looking for?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you! That worked
Copy link to clipboard
Copied
what did you fix to make this work? having same problem.
Copy link to clipboard
Copied
I am having a similar issue. I am using the following:
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)

Get ready! An upgraded Adobe Community experience is coming in January.
Learn more