Written by

J2 interactive
Question Laura Cavanaugh · Nov 9, 2016

Best way to redirect to home page when logging into 'middle' of application?

I need to catch the user using a bookmark to get into the application in the 'middle'; i.e. the user is getting into the application not  at the home page.  I've tried OnPreHTTP to redirect, but I can't catch the new session, and it doesn't redirect.

How can you redirect to the home page upon login?

Thanks,

Laura

Comments

Steve Riddle · Nov 9, 2016

On the Management Portal under System > Security Management > Web Application > Edit Web Application set the Login page to that of your home page.

It forces users to that page web they come to your site.

HTH

Jim

0
Laura Cavanaugh  Nov 9, 2016 to Steve Riddle

But the login page is already the Login page, which forces the user to authenticate first; it also go to the login page upon logout.

 

I tried this on some random web application; clicking on a bookmark brought me immediately to their login page; I didn't even have to login to get redirected.

0
Laura Cavanaugh  Nov 9, 2016 to Laura Cavanaugh

I need some kind of Authenticated flag to check, and if false, use OnPreHTTP to call %response.Redirect... 

0
Steve Riddle · Nov 9, 2016

In that keep as is and get your login page to redirect to your home page upon successful login.

Jim

0
Steve Riddle · Nov 9, 2016

document.getElementById("loginform").setAttribute("action","/csp/yourhomepage.csp");
window.setTimeout('document.getElementById("loginform").submit()',10);

0