Mod alias » History » Revision 11
Revision 10 (dandv, 2008-07-14 04:16) → Revision 11/17 (zkv, 2008-11-21 23:23)
h1. [[TracNav(DocsToc)]] <pre> #!rst ===== Alias ===== {{>toc}} ----------------- Module: mod_alias ----------------- *Module: mod_alias* .. meta:: :keywords: lighttpd, alias .. contents:: Table of Contents h2. Description =========== The alias module is used to specify a special document-root for a given url-subset. h2. Options ======= alias.url Rewrites rewrites the document-root for a URL-subset Default: empty *Example of usage*: <pre> Example: :: alias.url = ( "/cgi-bin/" => "/var/www/servers/www.example.org/cgi-bin/" ) </pre> *You You can add additional aliases by:* <pre> by: :: alias.url += ( "/content" => "/var/www/servers/www.somecontent.org/" ) </pre> h2. Additional information 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" -> "/content//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.