I am using cakephp 2.4.5. I would like to redirect all users who have not logged in to a login page. I basically followed the instructions here http://miftyisbored.com/a-complete-login-and-authentication-application-tutorial-for-cakephp-2-3/
In summary, the important part is the following code to AppController.php public $components = array('Session', 'Auth' => array( 'loginRedirect' => array('controller' => 'users', 'action' => 'index'), 'logoutRedirect' => array('controller' => 'users', 'action' => 'login'), 'authError' => 'You must be logged in to view this page.', 'loginError' => 'Invalid Username or Password entered, please try again.' )); Any websites with this URL format http://localhost/cakephp245/controllers/XXX will be re-directed to the login page. However, websites that are located inside webroot with URL that looks like thishttp://localhost/TTSH-CP245/app/webroot/XXX will not be re-directed to the login page. How can I get websites located inside app/webroot folder to be re-directed to the login page? Thank you very much. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.