Hi Kevin,
On Mon, 2006-05-15 at 17:13 -0700, Kevin wrote:> I use Apache to serve the static pages and let Mongrel handle Rails
> requests via mod_rewrite/proxy. Apache RewriteRule can set
> environment variable on the fly, and this is one of the features I
> used, set an env var based on domain name.
You should look at how mod_rewrite can inject HTTP headers. This is
commonly used when you have to translate to a different Host string, but
you can really inject any HTTP header you want. On the Rails side it
should show up as a capitalized version like this:
X-MyBrother-Is-Jim => X_MYBROTHER_IS_JIM
And will be in the request hash like all the other parameters you can
get.
Key thing is to not put this in the request string (like you said).
--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/