php - CakePHP Minify plugin and denying access to original files under webroot -


we use cakephp 2.7.9 , minify plugin on centos server running apache 2.2.
https://github.com/maurymmarques/minify-cakephp

the plugin works fine , can minify css files this.

echo $this->minify->css(array('default', 'global')); 

the code above generates url this.

http://example.com/min-css?f=default.css,global.css 

and want deny access original files under webroot/css. how can done in cakephp? want return 404 or 401 or direct url access this.

http://example.com/css/default.css 

and want deny access original files under webroot/css

simply don't non public code , files public webroot. it's not recommended in case. point minifier files , set output folder webroot.

we use task runners , keep minification code outside of actual app. stuff doesn't belong application - imho.

we use php robo , on js side gulp minification , automatically trigger tasks on deployment. our scss , js files outside of webroot. have few asset includes in our app code , never change. robo , gulp have watchers rewrite asset files change them on when app deployed automatically generates minified files.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -