lighttpd forum lighty > regexp and url-endocing

Posted by Gaetan Bisson (Guest)
on 09.07.2008 09:44
Dear lighty community,

I am using lighty to serve a wiki; to have nice urls, i use the 
following in my lighttpd.conf:

url.rewrite-once = ( "^/wiki/(.*)$" => "/wiki/awki.cgi/$1" )

and so i was hoping that everything going through /wiki/ would be 
interpreted by the script 'awki.cgi'. However, if I url-encode a part of 
the url, the above rewrite rule does not apply: if I access /wik%69/, 
lighty does not execute the script and gives me a listing of files in 
that directory!
Is there a way to avoid that?

NB: Renaming 'awki.cgi' to 'index.cgi' wouldn't work because I also want 
to protect subdirectories of /wiki/.