1## This file should be reviewed prior to inclusion in your lighttpd
2## configuration.  Specifically, if you have ansel somewhere other than
3## /horde/ansel you will need to edit the following rules to match your server
4## configuration.
5
6## This file should be included in your lighttpd.conf file with the "include"
7## directive. Example:
8##   include "path/to/lighttpd-ansel.conf"
9## The exact path you use will of course depend on your specific configuration.
10
11url.rewrite-once += (
12        ## General Groupings
13        "^/horde/ansel/user/?(?:\?(.*))?$" => "/horde/ansel/group.php?groupby=owner&$1",
14        "^/horde/ansel/category/?(?:\?(.*))?$" => "/horde/ansel/group.php?groupby=category&$1",
15        "^/horde/ansel/all/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=List&groupby=none&$1",
16
17        ## This might need some work to catch all possible usernames.
18        "^/horde/ansel/user/([@a-zA-Z0-9%_+.!*',()~-]*)/rss/?$" => "/horde/ansel/rss.php?stream_type=user&id=$1",
19        "^/horde/ansel/user/([@a-zA-Z0-9%_+.!*',()~-]*)/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=List&groupby=owner&owner=$1&$2",
20        "^/horde/ansel/category/([@a-zA-Z0-9%_+.!*',()~-]*)/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=List&groupby=category&category=$1&$2",
21
22        ## Galleries by ID
23        "^/horde/ansel/gallery/id/([0-9]+)/([0-9]+)/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=Image&gallery=$1&image=$2&$3",
24        "^/horde/ansel/gallery/id/([0-9]+)/rss/?$" => "/horde/ansel/rss.php?stream_type=gallery&id=$1",
25        "^/horde/ansel/gallery/id/([0-9]+)/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=Gallery&gallery=$1&$2",
26
27        ## Galleries by slug
28        "^/horde/ansel/gallery/([a-zA-Z0-9_@]+)/([0-9]+)/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=Image&slug=$1&image=$2&$3",
29        "^/horde/ansel/gallery/([a-zA-Z0-9_@]+)/rss/?$" => "/horde/ansel/rss.php?stream_type=gallery&slug=$1",
30        "^/horde/ansel/gallery/([a-zA-Z0-9_@]+)/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=Gallery&slug=$1&$2",
31
32        ## Tag browsing
33        "^/horde/ansel/tag/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=Results&$1",
34        "^/horde/ansel/tag/([a-zA-Z0-9%_+.!*',()~-]*)/rss/?$" => "/horde/ansel/rss.php?stream_type=tag&id=$1",
35        "^/horde/ansel/tag/([a-zA-Z0-9%_+.!*',()~-]*)/?(?:\?(.*))?$" => "/horde/ansel/view.php?view=Results&tag=$1&$2"
36)
37