How to restrict the file which is in the folder of my web application project which is built using vb.net?When the url of the web application is used to traverse the file ,it is able to access the file but the folder is restricted..I have the url as "https://firstwebsite.com/js/js.js".When this is run,it displays the script in the file(js.js). When https://firstwebsite.com/js/ is run,it shows the forbidden error.I need to restrict the file also and to show the forbidden error.I have disabled the directory browsing also and tried with many,but couldn't restrict.Server is windows 2008.
I don't have any .php pages but including all the security in web config file but i couldnot redirect the file requested also.I tried to place the script also.Can you please tell me how to redirect the url when https://firstwebsite.com/js/js.js is accessed?
I have a js file say "js.js" in my website.
say my website is "firstwebsite.com" and the js file is in a directory "js"
I want to prevent direct url access to the "js.js" file i.e. if anyone types the url "firstwebsite.com/js/js.js" ,then the js file should not be executed and it should return a error message(403.1 forbidden error or redirect to another page) instead.