Hi all!
The following site shows a (kinda hack-ish) way to protect an admin route with .htaccess:
http://snook.ca/archives/servers/password%5Fprotect%5Fadmin/
If I understand it correctly, it only works because CakePHP runs a check for the 'real' file presence before it processes its own URL logic. So, when you request yoursite.com/admin, it checks for the default document in the (real, since we've created it) /admin dir, and this check triggers the authentication.
My issue is: the 'hack' works OK if I set my debug level to '1' or higher. If I set it to Production Mode ('0'), I just get a cake-interpreted HTTP 401 (Access Denied) error.
So, my question is: is there any way to make this 'hack' work with the debug level set to zero?