I wanted the option of hiding my yii application from the public, and .htaccess did not 100% serve my needs. Using this component, I can very easily turn my site on and off and add manage allowed IPs from my config file.
I mainly use this as a way of protecting a site from the general public during development/testing/etc, redirecting the user to a 'coming soon' page.
ALSO: i'm a bit of a noob and wasn't sure how this should be categorized/tagged. Please post suggestions if you have them.
...requirements of using this extension (e.g. Yii 1.1 or above)...
...how to use this extension...
- Upload file UnderConstruction.php to components directory
- Load Component in main.php
// preloading 'log' component 'preload'=>array('log','UnderConstruction'), ...
- Configure Component
'components'=>array( ... 'UnderConstruction' => array( 'class' => 'application.components.UnderConstruction', 'allowedIPs'=>array('192.168.1.1','192.168.1.2'), //whatever IPs you want to allow 'locked'=>true,//this is the on off switch 'redirectURL'=>'http://www.yiiframework.com',//put in your desired redirect page. ), ...),