# NO FILES will be listed in folders, even if index files are missing.
--------------------------------------------------------------------
Options -Indexes
ErrorDocument 404 /index.php
Redirection rule using in lighthttpd config file (because the lighthttpd will not support .htaccess)
url.rewrite-once = ( "^/(.*)$" => "index.php/$1" )
Sample virtual host entry at /etc/lighthttpd.lighthttpd.conf
$HTTP["host"] =~ "filedumper.com$" {
server.document-root = "/var/www/lighttpd/www.filedumper.com/"
url.rewrite-once = ("generate-link([^/]+)?$" => "modules/test.html",
"rs/([^/]+)?$" => "modules/rsdownload.php?rsid=$1&rsfile=$2",
"mu/([^/]+)?$" => "modules/mudownload.php?muid=$1",
"hf/([^/]+)?$" => "/modules/hfdownload.php?hfid1=$1&hfid2=$2&hfname=$3",
"yt/([^/]+)?$" => "/modules/ytdownload.php?vidid=$1&idm=1",
"nl/([^/]+)?$" => "/modules/nldownload.php?nlid=$1",
"es/([^/]+)?$" => "/modules/esdownload.php?esid=$1",
"ul/([^/]+)?$" => "/modules/uldownload.php?ulid=$1",
"df/([^/]+)?$" => "/modules/dfdownload.php?dfid=$1",
"ms/([^/]+)?$" => "/modules/msdownload.php?msid=$1",
"mv/([^/]+)?$" => "/modules/mvdownload.php?mvid=$1&idm=1",
"mp/([^/]+))?$" => " /modules/mpdownload.php?mpid=$1&idm=1",
"idm/rs/([^/]+)?$" => "modules/rsdownload.php?rsid=$1&rsfile=$2&idm=1" )
accesslog.filename = "/var/log/lighttpd/www.filedumper_access.log"
}
Patterns ("wildcards") are matched against a string
Special characters (see [http://www.regular-expressions.info/reference.html] for reference):
. (full stop) - match any character
\* (asterisk) - match zero or more of the previous symbol
\+ (plus) - match one or more of the previous symbol
? (question) - match zero or one of the previous symbol
\\? (backslash-something) - match special characters
^ (caret) - match the start of a string
$ (dollar) - match the end of a string
[set] - match any one of the symbols inside the square braces.
[^set] - match any symbol that is NOT inside the square braces.
(pattern) - grouping, remember what the pattern matched as a special variable
{n,m} - from n to m times matching the previous character (m could be omitted to mean >=n times)
(?!expression) - match anything BUT expression at the current position. Example: "^(/(?!(favicon.ico$|js/|images/)).*)" => "/fgci/$1"
Normal alphanumeric characters are treated as normal