Although I’m sure it should be trivial to accomplish, I was having trouble getting the lighttpd mod_rewrite rules that I created working for Habari. I had already enabled the mod_rewrite server module, but I was struggling to get the syntax right. After much trial and error and some helpful web references I found the solution. I share it here in the hopes that you don’t struggle as I did.
I was working inside of my lighttpd-inc.conf file. As stated, I had uncommented the mod_rewrite server module. Then I added the statements below:
1 2 3 4 5 6 | $HTTP["host"] =~ "localhost:81" { url.rewrite-once = ( "^/habari/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" => "/habari/index.php$1", "^/habari/(?!scripts/|3rdparty/|system/|doc/)(.*)$" => "/habari/index.php" ) } |
After making that change and saving the file I re-started the lighttpd server process and it worked like a charm. If you are having a similar issue then I hope this helps.
Peace

