Managing requests for static content in WEBrick and Mongrel

All,

Is there a way to set things up so that requests for static files in
either WEBrick or Mongrel will just cause a regular HTTP request and not
cause the dynamic routing-based invocation to occur?

I had an issue where a request for a missing .js file was causing
another request to be registered, thus blowing away my flash data.

I tried to do this in my routing file, but I don’t think it is helping:

map.connect ‘javascripts/*stuff’
map.connect ‘stylesheets/*stuff’

Is there even a notion of separating static from dynamic content within
the WEBrick or Mongrel environments? If so, how is it achieved?

Thanks,
Wes

These are instances when a “higher up in the order” webserver would
shine.
Try routing from lighty to mongrel and then setting up conditional
redirect
rules there.

You can also set up an asset host:

config.action_controller.asset_host = “http://myassets.x.com” (in
environments/production.rb)

Vish

Vish,

Thanks. I’m good in production right now (although using Apache - need
to move to lighty or something else).

I’m wondering if I can control the development Web server to this extent
though.

Wes