Reputation: 5523
I don`t know anything about .htaccess files except how to secure a folder or deny access.
I want to deny direct access to .js
files (by typing the file name in url) on my server, say the files are stored in a folder named /js/
how can I use the .htaccess to do that?
Upvotes: 0
Views: 216
Reputation: 78741
You cannot do that.
Actually there is no 'direct access' or 'indirect access'. The browser accesses the JS file the same way when you load it from a SCRIPT tag and when you try to load it separately (typing the file name in browser).
Upvotes: 1