Gmane
From: Jan Kneschke <jan <at> kneschke.de>
Subject: Re: mod_rewrite + conditional config -> bug?
Newsgroups: gmane.comp.web.lighttpd
Date: 2005-11-16 11:00:23 GMT (3 years, 33 weeks, 16 hours and 45 minutes ago)
On Wed, Nov 16, 2005 at 10:33:24AM +0100, Jorik Jonker wrote:
> Hi,
> 
> I have been struggling with lighttpd in order to migrate one of our 
> sites from Apache (2.0) to lighty, but I keep having a reoccuring 
> problem, which I believe must be a bug: mod_rewrite seems to fail when 
> used in a (negative) conditional config.
> 
> Consider the following example:
> 
> 1 server.modules += ("mod_rewrite")
> 2
> 3 $HTTP["url"] != "/test" {
> 4        url.rewrite-once = (
> 5               "^(.*)$" => "/index.php?$1"
> 6        )
> 7 }
> 
> when a request to the url '/foo' is called, I get a 404. When I comment 
> out line 3 (and 7), a rewrite to /index.php?/foo is done succesfully. My 
> conclusion is the either something in lighttpd goes wrong (but what?), 
> or I am missing something.

$HTTP["url"] and url.rewrite don't work together.

url.rewrite-once ( "^/(?!test/)" => "/index.php?$1")

> Which one is the case?
> 
> kind regards,
> Jorik Jonker

 
    Jan

-- 
Jan Kneschke                                     http://jan.kneschke.de/
Perhaps you want to say 'thank you, jan':    http://jk.123.org/wishlist/