Too many redirects?

Hey all,

I’ve password protected a page following the Authentification tutorial in the docs. It basically works fine but if I login to the panel (via the panel login screen) and then refresh the page chrome gives me ERR_TOO_MANY_REDIRECTS

how come? there’s just one single redirect at the top of my template:

<?php if(!$site->user()) go('/') ?>

after several attempts to solve this and after a clean install of kirby I’m still not able to get this to work. And even if it’s working in chrome, in safari it doesn’t. :frowning:

don’t want to blame it on the software but did anything related to users/redirects/controllers happen in 2.1 that I’m not aware of?

Today I tried it with a completly fresh 2.1.0 Starterkit and the standard theme to no avail :frowning:

can somebody reproduce the error?

What exactly would I have to do to reproduce the problem. Download the starter kit and put the redirect at top of default.php template?

Nope. Follow @bastianallgeier’s Tutorial on authentification.

maybe I’ve just found the error. the redirect snippet needs to point to the login page, not home.

<?php if(!$site->user()) go('/login') ?>

instead of

<?php if(!$site->user()) go('/') ?>

which makes sense in a way. Otherwise the controller and the snippet are endlessly redirecting to each other which is detected and interrupted by the browser.