I would like all my ASP files to include files outside the root directory. This ensures that no include files can be called directly through the URL.
What is the best way to do this?
I know that I can use a virtual directory to link to a folder with folders outside the web root directory, but it doesn’t still allow direct access to this directory through the URL? Perhaps I do not understand the nature of virtual directories.
, " " IIS, - include, filesystemobject. , .
, , MSDN.
, Classic ASP, , , include , . , , - , , .
:
( )
. "" - , "" . , / .- - c:\websites\example.com. example.com, . , FileServerA D:\MyWebsiteIncludes. UNC \ FileServerA\D $\ MyWebSiteIncludes , \ FileServerA\MyWebsiteIncludes On -, , . , .
. "" - , "" . , / .
- - c:\websites\example.com. example.com, . , FileServerA D:\MyWebsiteIncludes. UNC \ FileServerA\D $\ MyWebSiteIncludes , \ FileServerA\MyWebsiteIncludes On -, , . , .
, Diodeus ', .
E:\includes\ \include.asp \another.asp E:\websites\ \business-website.com\ \config.asp \default.asp \personal-website.com\ \config.asp \default.asp \whatever-website.com\ \config.asp \default.asp
business-website.com -> E:\websites\business-website.com\ v. dir /include -> E:\includes\ personal-website.com -> E:\websites\personal-website.com\ v. dir /include -> E:\includes\ whatever-website.com -> E:\websites\whatever-website.com\ v. dir /include -> E:\includes\
: .
default.asp
Files in current directory: <!-- #include file="config.asp" --> Files in current directory (using virtual path): <!-- #include virtual="/config.asp" --> Files in include directory: <!-- #include virtual="/include/include.asp" -->
include.asp
Files in current directory: <!-- #include file="another.asp" --> Files in current directory (using virtual path): <!-- #include virtual="/include/another.asp" --> Files in root application: <!-- #include virtual="/config.asp" -->
.
Source: https://habr.com/ru/post/1699280/More articles:GetProcessID Alternative for Windows 2000 - c ++Mach-O for OSX? - editorBuildfarms: Options - compiler-constructionПочему я не могу использовать статические элементы, например статические структуры, в моих классах в VS2008? - c++Can I make iPhone apps using only OpenGL and not Cocoa Touch? - chow can i check the start of line in php? - stringHow to read "company name" from Windows using C #? - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1699283/net-forms-authentication-how-to-limit-access-to-resources-like-pdf-files-to-authenticated-users-only&usg=ALkJrhgM8247G8D-82LpiAXds2uhhccymQДублировать список SharePoint - sharepointHow to rewrite Adobe Photoshop plugins for Adobe Lightroom? - pluginsAll Articles