I think I would leave the scripts in the location of the scripts, but if you want to move them, you can do the following:
At the top of the web.config file under the views, find
<httpHandlers> <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/> </httpHandlers>
And replace it with the following:
<httpHandlers> <add path="*.aspx" verb="*" type="System.Web.HttpNotFoundHandler"/> <add path="*.master" verb="*" type="System.Web.HttpNotFoundHandler"/> <add path="*.ascx" verb="*" type="System.Web.HttpNotFoundHandler"/> </httpHandlers>
You will need to add the extension of each type of file that you want to block.
source share