This tutorial will useful to change your yiiframework website to maintenance mode. User can access maintenance file only.
Maintenance Controller
Make or Point the controller action to maintenance mode.
return array(
'catchAllRequest'=> array('site/maintenance'),
............
Maintence File
Make or Point the file to maintenance mode. If the condition file_exists() return false, The maintenance mode will be off or not work.
'catchAllRequest'=>file_exists(dirname(__FILE__).'/.maintenance')? array('site/maintenance') : null,