Mod alias » History » Revision 14
« Previous |
Revision 14/17
(diff)
| Next »
heavyhttpd, 2009-01-10 22:11
fix wrong dir name in example
Alias¶
- Table of contents
- Alias
Module: mod_alias
Description¶
The alias module is used to specify a special document-root for a given url-subset.
Options¶
alias.url
Rewrites the document-root for a URL-subset
Default: empty
Example of usage:
alias.url = ( "/cgi-bin/" => "/var/www/servers/www.example.org/cgi-bin/" )
You can add additional aliases by:
alias.url += ( "/content" => "/var/www/servers/www.somecontent.org/" )
Important note:
As trailing slashes are stripped from the url before matching an alias, the alias "/content/ => "/dirtocontent/" will not match the url "/content/"; it matches only something like "/content/somefile" or "/content/somesubdir/".
So in most cases you shouldn't use a trailing slash on the left side (but use it on the right side!): "/content" => "/dirtocontent/"
Now "/content_x1/" is mapped to "/dirtocontent/_x1", "/content/" -> "/dirtocontent/" and "/content/somefile" -> "/dirtocontent//somefile" (yes, double slash).
If you don't use it on the right side too, "/content_x1/" is mapped to "/dirtocontent_x1", which you probably don't want.
Updated by heavyhttpd almost 16 years ago · 14 revisions