Moving protected folder outside your Web Root


In the latest trunk of the framework, we are able to move the protected folder in an application outside your web server root directory. Let’s say you have a structure as below:

1.
www/
2.
superapp/
3.
proctected/
4.
index.php
5.
global/
To move it outside the WWW folder:

1.
superapp/
2.
proctected/
3.

4.
www/
5.
superapp/
6.
index.php
7.
global/
Just change the configs after you move your files, SITE_PATH setting

1.
//original
2.
C:/wamp/www/superapp/
3.

4.
//changes
5.
C:/wamp/superapp/
If you don’t wish to keep the name protected and wanted everything under superapp, try this:

1.
superapp/
2.
view/
3.
controller/
4.
…..
5.
www/
6.
superapp/
7.
index.php
8.
global/
Add on a new setting to common.conf.php, PROTECTED_FOLDER:

1.
$config[‘PROTECTED_FOLDER’] = ”;

Previous PostNextNext Post

Leave a Reply

Your email address will not be published.