On 14.10.2005, at 8.51, Pat Maddox wrote:
> I used an example lighttpd config a while ago, and it had some rewrite
> rules in it. I read recently (on the wiki I think) that because of
> routes, there''s no need for these rules anymore. Evidently
I''m behind
> the curve on this...
>
> Here are the lighttpd rewrite rules I''ve got set up:
> url.rewrite = (
> "^/$" =>
"/dispatch.fcgi?controller=blog&action=index",
> "^/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9%]+)\??
> ([\-_a-zA-Z0-
> 9=&%]*)$" =>
>
"/dispatch.fcgi?controller=$1&action=$2&id=$3&$4",
>
"^/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9]+)/?\??([\-_a-zA-Z0-9=&
> %]*)$" =>
> "/dispatch.fcgi?controller=$1&action=$2&$3",
> "^/([\-_a-zA-Z0-9]+)/?\??([\-_a-zA-Z0-9=&%]*)$"
=>
> "/dispatch.fcgi?controller=$1&action=index&$2"
> )
>
> In all honesty, I don''t have a clue what any of that is. I think
the
> first one was to make the registration work for the salted hash login
> generator.
>
> Should I just get rid of these? How do I convert it all to routes?
> Really I just want to know the best way to set up my app.
Seems to me that the only thing you need to do is to uncomment the
route for your app root and point it to your blog controller.
Otherwise the default route at the end of routes.rb should take care
of the things in those rules. So yes, you could get rid of that
easily if you wanted to harness the routes world.
//jarkko
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails