Kyle Maxwell | 27 Sep 12:16

SCGI + apache solution

The following fixes caching, etc in Apache + SCGI.  It would be nice
to not have to repeat oneself in the routes file, but I'm sure someone
can come up with a solution for that.  Doubling up the routes lets the
first route generate a clean url_for, and the second one handles the
actual redirected url.

Kyle Maxwell

#in httpd.conf
SCGIMount /scgi-bin/ 127.0.0.1:9999

#in .htaccess, replace the dispatch.(f)cgi line with:
RewriteRule ^(.*)$ /scgi-bin/$1 [QSA,L]

#in routes.rb, double up *each* of your routes as so:
map.connect ':controller/:action/:id'
map.connect 'scgi-bin/:controller/:action/:id'

Gmane