开发者

.htaccess redirect certain files

开发者 https://www.devze.com 2023-01-29 05:11 出处:网络
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 st

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 开发者_如何学JAVAto do that?


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消