良玉的博客 点点滴滴,积水成河_良玉的博客_页游、手游linux运维工程师之路

Lighttpd Module: mod_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:

solid rgb(226, 226, 226); width: auto; overflow-x: auto; overflow-y: hidden; color: rgb(72, 72, 72); font-size: 12px; background-color: rgb(250, 250, 250);">    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.


标签: lighttpdmodulealiasoptionurlwww

作者:良玉 分类:lighttpd 浏览:561 评论:0
留言列表
发表评论
来宾的头像