On Umbraco Backoffice I have set up a protected page, when the user is not logged in he should get redirected to the log in page
When a not logged in user tries to access the protected page he indeed gets the log in form displayed, but I noticed that the URL doesn't change, and with further investigation I understood that he is not getting redirected, Umbraco simply shows the log in page to display
Is there a way to redirect the user to the log in page, instead of just displaying the log in page instead of the protected one?
This is the default behaviour of Umbraco, it renders the login form on the URL of the page that was requested, rather than doing a full redirect. I'm not sure if there's a way to change that behaviour out of that out of the box though. As it's just a .Net site, you could try setting the login page in the web.config file and protecting the location there instead of using Umbraco's login stuff, that might work (although I couldn't say fr 100% certain as I've not tried it myself)?
The way I solved this is that the log in page set on umbraco is a page that runs javascript code to go to the right url, not a pretty solution, but it works
Protected page redirect
Good morning
On Umbraco Backoffice I have set up a protected page, when the user is not logged in he should get redirected to the log in page
When a not logged in user tries to access the protected page he indeed gets the log in form displayed, but I noticed that the URL doesn't change, and with further investigation I understood that he is not getting redirected, Umbraco simply shows the log in page to display
Is there a way to redirect the user to the log in page, instead of just displaying the log in page instead of the protected one?
Kind regards
Hi Tiago,
This is the default behaviour of Umbraco, it renders the login form on the URL of the page that was requested, rather than doing a full redirect. I'm not sure if there's a way to change that behaviour out of that out of the box though. As it's just a .Net site, you could try setting the login page in the web.config file and protecting the location there instead of using Umbraco's login stuff, that might work (although I couldn't say fr 100% certain as I've not tried it myself)?
Regards,
Tim.
The way I solved this is that the log in page set on umbraco is a page that runs javascript code to go to the right url, not a pretty solution, but it works
is working on a reply...