Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: mod_proxy patches for HTTP Header manipulation

From: Kwindla Hultman Kramer <kwindla(at)allafrica.com>
Date: Mon May 21 2001 - 17:29:21 EDT

Bill Stoddard writes:
> Hi Kwindla,
> Give me a specific example and I'll see what I can do to scratch your itch :-)

Heh,

How about...

RequestHeader set Language fr %{HTTP_HOST} ^fr

This is close, in spirit, to one of the things we are currently doing using our patched 1.3.19 mod_proxy
(http://hub.allafrica.com/tools/apache/mod_proxy/): passing requests to a mod_perl backend server and telling it what language it should treat as primary.

The pieces are:

  1. 'RequestHeader': modify incoming headers rather than outgoing
  2. 'set': mod_headers command
  3. 'Language': the header to set
  4. 'fr': the value string for the header
  5. '%{HTTP_HOST}': what to match against (syntax cribbed from mod_rewrite)
  6. '^fr': the regular expression -- if it matches, perform the action, if it doesn't, don't.

I'm not at all wedded to the proposed syntax, but I do confess that I don't really like mod_rewrite's RewriteCond/RewriteRule separation. I'd prefer to have things all in one directive. And, while mod_rewrite supports (by my count) 36 server variables -- and back references in the substitutions -- I'd be happy to be a little less ambitious <laugh>.

Do you need help?X

Yours,
Kwindla Received on Mon May 21 21:30:14 2001

This archive was generated by hypermail 2.1.8 : Thu Aug 24 2006 - 14:53:16 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library