Home > Technical > Lighttpd, Joomla, and clean URLs

Lighttpd, Joomla, and clean URLs

So I’m working on a new web server but I don’t want to use Apache since it’s a virtual machine. Had some trouble with the rewirte rules but I think I got them

From this forum post


$HTTP["url"] !~ ".(gif|png|css|jpg|jpeg|js)$" {
   server.error-handler-404 = "/index.php"
}

But I thought of a different approach and it seems to work so far, and maybe causes less error messages in the logs:


url.rewrite-once = ("^/(.*.html)$" => "/index.php?page=$1", "^/(.*.html?.*)" => "/index.php?page=$1", "^/(.*/?.*)" => "/index.php?page=$1")

Have a good one

Categories: Technical Tags:
  1. No comments yet.
  1. No trackbacks yet.