> On 9/8/05, Williams, Chris
<Chris.Williams-yLTBD9Em4aGakBO8gow8eQ@public.gmane.org> wrote:
> > My lighttpd.conf has the following for rewrite:
> >
> > url.rewrite = ( "^/$" => "index.html",
"^([^.]+)$" => "1$.html" )
> >
> > I also tried:
> >
> > url.rewrite = ( "^/$" => "index.html",
"^([^\.]+)$" => "1$.html" )
> >
> > I''m no lighttpd or rewrite guru but those look right to me,
append .html
> > if the url has no periods in it (besides the host portion)
I had similar problems, and I ended up with this, which seemed to work:
url.rewrite-once = (
"^/$" => "index.html",
"^([^.]+)$" => "$1.html"
)
(Appears to be the same as your first one, except 1$ should be $1.)
Note that the order that modules load in is significant. I''m not sure
what the "correct" order is, but mine looks like:
server.modules = ( "mod_rewrite", "mod_redirect",
"mod_setenv",
"mod_alias", "mod_access", "mod_fastcgi",
"mod_cgi", "mod_accesslog" )
As an aside, it would be great if Rails included (or generated?) a
boilerplate lighttpd.conf, since lighty is so popular with Rails apps.
Especially since page caching won''t work out of the box without this
rewrite rule (as far as I can tell.)
Scott Raymond
--
scottraymond.net
redgreenblu.com
blinksale.com