Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean way to redirect to login instead of throwing 404 #2

Open
cognifloyd opened this issue Jul 3, 2012 · 1 comment
Open

Clean way to redirect to login instead of throwing 404 #2

cognifloyd opened this issue Jul 3, 2012 · 1 comment

Comments

@cognifloyd
Copy link

This feature request might or might not make sense for cicregister to implement. I think it makes sense, because it has to do with having a good user experience for logging in. It might not, because it involves playing with TYPO3's 404 handling.

So, if I go to an access protected page (like http://cicregister.castironcoding.com/enroll/ ) without being logged in, TYPO3 throws a 404 error: "ID was not an accessible page". When I'm requesting an access protected page, and I'm not logged in, I would rather see the login page with a 401 status code than the 404 TYPO3 currently sends.

This might involve some kind of 404 handler that is put in localconf.php:
$TYPO3_CONF_VARS["FE"]["pageNotFound_handling"]

Or, is there already a way to redirect to the login page if an access protected page is requested? Or perhaps, just load the login page on the requested page, and then reload the page once logged in?

@zdavis
Copy link
Member

zdavis commented Jul 3, 2012

Thanks for the feedback, Jacob.

I agree that this functionality would be a nice addition to cicregister, and that redirecting to login when pages are access restricted is sensible default behavior. AFAIK, the place to implement this would be in a 404 handler, but it would be nicer if we could find a way to trigger the redirect before the 404 handling is called, so that installations that use cicregister would still be free to implement their own 404 handling. I'll dig around for a hook and see if I can come up with a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants