I include some javascript and css in my code (e.g. src='include/script.js', href='include/style.css' in my index.php).
Is there any way to protect my files from download when ppl enter the full url of the script? (e.g. domain.com/include/script.js)?
I've tried the .htaccess but then it will ask for the password whenever I visit index.php. Is there any way to direct visitor to an error 403 page when they enter the full url of the script?
here is my .htaccess setting:
AuthUserFile passwordfile
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
<limit GET POST>
require valid-user
</limit>
btw, do i need to config .htaccess if i place my important files outside the website root? Will ppl still be able to steal the files?
thanks