Modify request headers ??

Discussion in 'General' started by 28122008, Sep 17, 2009.

  1. 28122008

    28122008 Member

    Is it possible to modify/add request headers before passing it to a external application (PHP) for processing ? If yes how ?

  2. mistwang

    mistwang LiteSpeed Staff

    You can add environment variable with rewrite rule, only URL and Query String can be changed with rewrite rule.
    You can fake a request header value with environment variable, but may not able to override an existing header.
  3. 28122008

    28122008 Member

    To be more specific, is there any way to do this:

    SetEnvIf Content-Type ^(multipart/form-data)(.*) NEW_CONTENT_TYPE=multipart/form-data-alternate$2 OLD_CONTENT_TYPE=$1$2
    RequestHeader set Content-Type %{NEW_CONTENT_TYPE}e env=NEW_CONTENT_TYPE

Share This Page