Directory Aliasing


Aliasing Overview
The [aliases] and [cgi-aliases] sections of the config.ini file allows documents and CGI scripts to be stored in a directory other than the Documents Directory and CGI Directory. URLs with a (%-decoded) paath beginning with url-path will be mapped to local files beginning with directory-path:

[aliases]
# url-path = directory-path
/image = /pub/image

A request for http://<your machine>/image/foo.gif would cause the server to return the file /pub/image/foo.gif. Note that if you include a trailing slash (/) on the url-path then the server will require a trailing slash in order to expand the alias. For example, if you use the alias:

[aliases]
# url-path = directory-path
/images/ = /pub/images/

then the URL http://<your machine<>/images will not be aliased.

IMPORTANT Aliases and CGI-aliases apply to all virtual hosts of the server.

All mapings are compared with the "root" of the URI. So the URI /foo/images/ will not match the alias above.


Copyright 1997 Sambar Technologies