0

I'm trying to use rewrite on Lighttpd but I cannot get it to work.

I try the following:

$HTTP["host"] =~ "asdf.com" {
    server.document-root = "/home/www/asdf.com"
    url.rewrite = ( 
        "/^test/$" => "/test.html",
    )
}

but I just receive an 404 error when I visit asdf.com/test/ I have also tried without the $HTTP["host"] {} option, but that also give me a 404 error.

In the lighttpd.conf I have the following:

  server.modules = ( 
     "mod_rewrite",

I tried several examples but everything just seems to give me a 404 error. Are there any commands I can use to check if the rewrite module is actually enabled?

j0k
  • 22,600
  • 28
  • 79
  • 90
Markus Helin
  • 53
  • 1
  • 7

1 Answers1

1

Try with the rewrite:

"^/test/$" => "/test.html",
j0k
  • 22,600
  • 28
  • 79
  • 90