This solution is simple and works fine for me. http://perishablepress.com/press/2010/05/19/htaccess-redirect-maintenance-page-site-updates/
On Sep 5, 9:45 pm, Xoubaman <[email protected]> wrote: > I'm trying to implement a system to disable the site temporaly for > maintenance purposes or whatever. If the site is disabled, only logged users > can navigate through it, non-logged users are redirected to a "Site under > maintenance" layout. > > Currently (o "As of now"), my approach is to allow a "secret url" that will > lead to the login form, check in AppController::beforefilter if the current > url is the allowed one and, if it isn't, set the maintenance layout. Trying > to figure out how to allow only one url to log in, I came to define it as a > constant in bootstrap and add the route in config/routes pointing to > UsersController::login. > > It would be nice to save the secret url into the database and change it > without editing bootstrap.php, though. > > Any suggestion? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
