Saturday, April 30, 2011

Re: Site down config

Hey,

I forgot to mention that the route I suggested has to be the FIRST
route in the routes.php file to catch every route.

Interesting suggestion about the header though! Could you give me an
example of such a header? Would you use a different layout set by the
pages_controller or is there any way to set the header within the view
(maintenance.ctp) or the controller action (e.g. "display" in
pages_controller, where you can switch/case the called page and run
some code like setting the layout...)?

Would be nice to see this once, my own maintenance page does NOT set
any header atm...

Regards,

DD


On 30 Apr., 23:49, Sam Sherlock <sam.sherl...@gmail.com> wrote:
> be sure to send the correct 503 header too (dp plugin does this)
>  - S
>
> On 30 April 2011 22:46, DigitalDude <e.blumsten...@googlemail.com> wrote:
>
> > Hey,
>
> > that's easy:
> > Simply define a route in your routes.php file like this:
>
> > Router::connect('/*', array('controller' => 'pages', 'action' =>
> > 'display', 'maintenance));
>
> > Obviously you will need a page in app/views/pages/ called
> > "maintenance.ctp" where you can display all information you want.
>
> > When you're done with maintenance, simple put a '#' before the route
> > (to comment it out) and your app will be back in normal mode.
>
> > Regards,
>
> > DD
>
> > On 29 Apr., 20:04, Toby G <t...@tgpromotions.com> wrote:
> > > Hi there,
>
> > > I'd like to be able to set a 'catch-all' route or config that allows
> > > me to direct all site trafic to a maintenance page.  Any suggestions
> > > on the best way to do this?
>
> > > Thanks,
>
> > > T
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: