问题描述:

I been searching and couldn't find this answer, usually they all ask how to block viewing the file from outside the domain.

I have a website where I don't have access to the remove a script by hand or Javascript since it executes before I can do it, but I do have access to the folder, so I was thinking if I can add an .htaccess blocking that specific JavaScript file (not all the .js files, only one which is prototype).

Is there any code to do to that?

Thank you in advance.

网友答案:

Yes there is! Put this in your .htaccess file:

<Files "example.js">
Order Allow,Deny
Deny from all
</Files>
相关阅读:
Top