NANOWEB, the aEGiS PHP web server
.lnk files
A .lnk file can be used to redirect to another location whithin the
filesystem or to point nanoweb to some more virtual proto:// file source.
If you create such a .lnk file it should just contain a line with the
destination path or URI:
/path/to/other/directory/
or
ftp://ftp2.example.com/export/www/
If a request
http://www.example.com/a.lnk/this/file.txt for a .lnk
file with a trailing path_info is detected mod_lnk will redirect Nanoweb
to the given path or file.
Of course this is not really impressive and could be done much more easily
using syminks or the
Alias directive, but as
it comes to "virtual" file sources this module may help you. As seen above
you can redirect to URLs as well. The ftp:// and http:// are already known
to PHP and can be used here. Other extension modules (like mod_mysql_scheme)
may introduce more strange protocol sources for use with mod_lnk.
mod_lnk parses Windows' visual shortcut files as well to come around the
lack of symlinks under Win32 systems. It currently seems to work for most
.lnk files, but you should prefer the one-line .lnk file format as described
above.
To enable mod_lnk and .lnk files you must enable it using the
ParseExt directive in
nanoweb.conf:
ParseExt = lnk LNK
Note that requests to files redirected with .lnk files are currently handed
over to nanowebs static_response() and thus cannot be .php scripts for
example.
NANOWEB, the aEGiS PHP web server