Perhaps I just don't understand how things are supposed to work but
here's what I want to do and I'd appreciate someone explaining why it
doesn't work and what (if anything) I can do to make it work. Thanks!
In the Apache vhost file for my website I have:
==================================
RewriteEngine On
RedirectMatch 404 (.*)somestring(.*)
RedirectMatch 404 ^/framework/_images(/?|/.*)$
What I expect to happen is that when a request comes in like:
=============================================
http://www.mywebsite.com/gallery/somestring/someotherfile.html
or
http://www.mywebsite.com/framework/_images/somefolder/somefile.html
I expect Apache to catch both of these and issue a 404 error back
without bothering the ROR application.
What is happening is that these requests are being passed into the ROR
application by Passenger and it's being caught there instead. This is
a problem for me as (1) I don't see why Apache can't catch it first
and not even start up or run the ROR application and (2) my ROR
application has caching turned on so Apache serves up the cached pages
without having to run the ROR app. This is very slick and fast however
when a request comes in for something I expect Apache to catch first
and it doesn't, it has to start up my ROR application (with all the
attending startup delays, memory usage, etc.) just to allow my ROR
application to serve the 404 page.
What can I do to force Apache to handle these explicit 404 cases
without bothering the ROR application?
Thanks, Art