MyBB Community Forums

Full Version: Jscript folder denying from all ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the root directory there is jscript folder
I noticed that anyone can access and read the code written the files inside that folder by using the urlĀ  example.com/forums/jscripts/post.js

Can i put a .htaccess file containing deny from all inside that jscript folder, it wont break anything ?
This folder and its content need to be accessible from the browser.
You can, however, make sure you have index.html files in each subdirectory to prevent directory listing or include this in a .htaccess file within it:
Options -Indexes
A general answer is NO. You could try to look here: http://stackoverflow.com/a/1340052/1973205

I think that this is a bad practice. If you want, you can obfuscate your js with a minifier, but the allow by htaccess imho is not good, you can still view the js by Firebug for example.

So the best way is to minify.