Much like Apache, Lighttpd (lighty) has a rewrite module to rewrite URL requests; allowing ‘ugly’ page requests to look nice. Unfortunately, the rule sets I found on the net didn’t work too well with Menalto’s Gallery 1, so I ended up creating my own. The core change from the other rule sets I found is the ability to handle ?page=x on album views.

url.rewrite-final = (
   => "/gallery/view_photo.php?set_albumName=$1&index=$2",
   => "/gallery/setup/",
   => "/gallery/$1",
   => "/gallery/view_photo.php?set_albumName=$1&id=$2",
   => "/gallery/view_photo.php?set_albumName=$1&id=$2&$3=$4",
   => "/gallery/view_album.php?set_albumName=$1&page=$2",
   => "/gallery/view_album.php?set_albumName=$1"  )
Gallery 1 and Lighttpd
Tagged on: