Securing your templates folder.
Kafeinfo Bookmarking Sosial application is heavily based on the model-view-controller design pattern. To implement the MVC design, I use PHP Smarty templating engine for the presentation layer. One of the drawback is you can just view the templates by typing the templates address on your browser, ex. www.yourdomain.com/templates/index.tpl.
By looking and examine the template content, one can view what variables that are passed along to the template, the loop structure and that just doesn’t seems nice is it? That’s why to prevent a direct access to the template, I used a .htaccess file. Just create a file called .htaccess on your texteditor and type this:
deny from all
And just upload this file in your templates folder.
April 24th, 2008 at 9:28 pm
wait wait. gw kira konsep MVC cuman ada di Java.. hahaha.. ternyata itu general toch