TYPO3 - Redirecting to login page when user is not logged in

Jacek Francuz picture Jacek Francuz · Nov 15, 2011 · Viewed 10.6k times · Source

I have some restricted pages built in Typo3. The problem is I cannot automatically redirect user from these pages to login page. How do I do that? I desperately need it and cannot find a solution despite of the fact I have spent most of the day working on it :(

Any help will be much appreciated.

Answer

Mateng picture Mateng · Nov 16, 2011

That should work fine:

# Restricted area starts at pid 123.
# Check if user is logged in:
[PIDinRootline = 123] && [usergroup = *]
# do something
[else]
page.config >
page.config.additionalHeaders = Location: http://www.yourdomain.org/login.html
[end]

Found here