Presumably, if you used rewrite rules rather than 404, then Rails''
page caching technique will be ineffective. So if you have a rewrite
rule to route a particular controller''s URL to Rails, then Litespeed
won''t get a chance to check the public directory for cached pages.
I thought the 404 technique was specifically intended to make page
caching work.
On 5 Sep 2006, at 20:29, George Wang wrote:
> We does that for the sake of performance, 404 handler can be processed
> faster than rewrite rules, the default rewrite rules for Rails request
> dispatching is just like a manually crafted 404 handler.
> However, with LiteSpeed 2.2 LSAPI, vhost level rewrite rules have
> higher
> priority than 404 handler, so if you prefer using rewrite rules, just
> customize your own rewrite rules to determine what URLs should be
> routed
> to Rails.
> It is better to have the web server serving static files when proxy to
> mongrel on localhost.
>
> Kevin Williams wrote:
>> I have two questions about the 404 error redirection technique,
>> which I
>> first saw with Lighttpd/FastCGI and now see with Litespeed 2.2 LSAPI
>> docs[1].
>>
>> 1) Why is this a good idea? It seems like using errors to control
>> program flow, which is a big no-no where I come from.
>>
>> 2) How do real 404s get passed along and handled? In other words,
>> say
>> “/images/rails.pnq” is not found in the file system. The redirection
>> would pass that URI to Rails, which would claim a routing error.
>> Is it a
>> Rails error? No, it’s a static file not found.
>>
>> People (me included) were having lots of trouble with Lighttpd/
>> FastCGI
>> and welcomed the Mongrel/proxy setup with welcome arms. Now along
>> comes
>> LSAPI and the 404 redirect is back. It seems suspect to me, but
>> that''s
>> likely just a lack of understanding - thus the reason for this post.
>>
>> I would never understand a really low-level explanation of C
>> pointers or
>> memory maps or whatever, but a simple explanation of the reasoning
>> for
>> this would help ease this dull migraine I’ve got going. :)
>>
>> Cheers,
>>
>> Kevin
>>
>> [1]
>> http://www.litespeedtech.com/support/wiki/doku.php?
>> id=litespeed_wiki:ruby_rails
>>
>>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---