lighttpd forum lighty > Problem with 404 URLs

Posted by Markus (Guest)
on 01.05.2008 18:37
Hello,

i have a little problem with lighty. Why dont get i an 404 error for 
some URL like this:

www.example.com/test.php/dfgdf/dfsgdsfg/

The test.php exist but the rest not. Lighty display the test.php but i 
want an 404 error. What can i do?

My Config ist realy simple:
$HTTP["host"] == "example.com" {
   url.redirect = ("^/(.*)" => "http://www.example.com/$1")
   server.document-root = "/dev/null"
}
$HTTP["host"] == "www.example.com"  {
   server.document-root = "/var/www/"
   server.error-handler-404 = "404.php"
}
Posted by Guest (Guest)
on 02.05.2008 10:15
Markus wrote:
> i have a little problem with lighty. Why dont get i an 404 error for 
> some URL like this:
> 
> www.example.com/test.php/dfgdf/dfsgdsfg/
> 

When you do this, anything after the .php will be considered as file 
parameter.

This is how other web servers too work.
Posted by Rhinofly Yin
on 04.05.2008 10:51
Guest wrote:
> Markus wrote:
>> i have a little problem with lighty. Why dont get i an 404 error for 
>> some URL like this:
>> 
>> www.example.com/test.php/dfgdf/dfsgdsfg/
>> 
> 
> When you do this, anything after the .php will be considered as file 
> parameter.
> 
> This is how other web servers too work.

As far as 1.5.0-svn you can not disable pathinfo support in lighttpd.