Yii Framework Forum: Maintenance mode - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Maintenance mode without touching configuration Rate Topic: -----

#1 User is offline   pestaa 

  • past Yii dev member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 705
  • Joined: 07-May 09
  • Location:Hungary

Posted 24 August 2009 - 07:17 PM

So you are well prepared for future cases when you will do fine-tuning, you already have a nice error page for those who want to visit your site while you're knee-deep in settings and switches.

But what if you are lazy to fire up the text editor each time you want to put your website into maintenance mode?

I put this code in my configuration array:
'catchAllRequest'=>file_exists(dirname(__FILE__).'/.maintenance')
	? array('site/maintenance') : null,


Simply creating an empty '.maintenance' file in config folder will keep your visitors informed until you finishes all administrative tasks.

I'm confident this won't cause significant overhead to your filesystem if you don't have really huge traffic.
2

#2 User is offline   henqi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 10-March 09

Posted 21 September 2009 - 09:49 AM

This is what I am looking for. Thanks! ;D
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users