I’m trying to get the same code base to run correctly under FastCGI and
My application “lives” under a base url of /club. That is to say, URLs
of the form www.mydomain.com/club/:controller/:action/…
With fastcgi, the routes file entries need to look like:
since the public directory is mapped in apache under the url /club/
With scgi, the same route needs to be:
I thought, hey, why don’t I control this with a variable, so in my
file I have:
webrick and fastcgi version: base = ‘’
scgi version: base = ‘club/’
base = ‘club/’
So, if I want to run scgi, I just modify one line.
I’d like to now automate it, and detect somehow if the code is being run
SCGI, and set my ‘base’ variable on the fly.
Does anybody have an idea how to detect if the code is being called by