ALP ALP URL

How ALP URL works

General syntax of the ALP URL-s is:

alp://drive:/path1/../pathN/file.ext?parameter1=value1&....&parameterN=valueN

URL contains full physical path pointing to a file or a directory. Parameters (query string) are optional.

Before processing ALP must determine current site, application and directory

  • Site - is a root point of the subtree that will be treated as one virtual site. All content of the site is isolated from other sites unless the sites not overlap (allowed). ALP associates with the site some general settings. If no site definition is found ALP assumes for its root the root of the drive. Also note that application root (e.g. ASP application root point) is created for every site by default.
  • Application - is a root directory of the subtree that shares common application/execution settings. If no application is found in a particular site Application root equals to the site root. Application holds many settings and defines how to process the content. For example ASP Application and Session objects are unique for every separate application tree. 
  • Directory - is always the directory pointed by the URL or directory containing the pointed resource. It holds additional settings such as execution rights and default document settings.

ALP determines the root points of the Site, Application and Directory settings by searching backward the location pointed by the URL for certain configuration files:

  • alp.site - specifies site root. If not found up to the drive root drive root directory is assumed to be a site root. Empty file is enough to triger virtual site root point at the directory containing the file.
  • alp.application - specifies the application start point. If not found up to the site root - site root is assumed to be an application root. Empty file is enough to define new ASP application root point at the directory containing the file
  • alp.directory - specifies directory settings root. If not found up to the site root - site root setting are applied (if any). Empty file can be used to revert to default settings if another alp.directory file exists in one of the parent directories.

Files can be empty if there is no setting to override but their existence is important in order to set the start points.

Example:

Lets take the following directory tree:

C:\sites

There are 2 site files:

C:\sites\site1\alp.site and C:\sites\site1\dir1\site2\alp.site

2 application files:

C:\sites\site1\dir1\alp.application and C:\sites\site1\alp.application

The URL: alp://c:/sites/site1/dir1/dir2/file.htm

has site root: c:\sites\site1 and application root: c:\sites\site1\dir1

The URL: alp://c:/sites/site1/dir1/site2/dir3/file.htm

has site and application root: C:\sites\site1\dir1\site2

By determining the starting points ALP defines such values as host name and URL path. It returns the site physical path with "/" slashes as a host name and resting part of the path as URL path. In previous example for the first URL host name will be c:/sites/site1/ and for the second c:/sites/site1/dir1/site1/. The URL path will be for the first case /dir1/dir2/ and for the second /dir3/.

alp.directory is treated as like the alp.application - the difference is in the meaning of the information found in the file - see ALP Directory.

 

newObjects Copyright newObjects 2001-2004