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.
2 |
'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.
1 |
'catchAllRequest' => file_exists (dirname( __FILE__ ). '/.maintenance' ) |
2 |
? array ( 'site/maintenance' ) : null, |