[Catalyst] Re: uri_for() not working under lighttpd fastcgi

Jim Spath jspath at pangeamedia.com
Fri Sep 14 16:17:53 GMT 2007


Carl Franks wrote:
> I discovered that if instead of hitting:
>     http://my-domain/amazon
> I hit:
>     http://my-domain/amazon/
> 
> ... then uri_for() started working as expected.
> 
> I added a rewrite rule to my lighttpd config:
>     url.rewrite = ( "^/amazon$" => "/amazon/" )
> and everything is now working again.
> 
> I don't know if this is the best solution though.
> 
> Cheers,
> Carl

I have run into this same issue... on our development lighttpd server 
the Catalyst application is accessible through URLs like:

   http://domain/~user/myapp/

If you didn't include the trailing slash, Catalyst would set 
$c->request->base incorrectly.

Our solution was simply to force trailing slashes (although I am having 
trouble finding this configuration option), which really just works 
around the core Catalyst issue.  I'll see if I can dig up more on this.

- Jim



More information about the Catalyst mailing list