This took me a while to figure out, so I wanted to share it:

Requirement: before reaching the application, Apache should rewrite a
header like:

MSISDN: 639285020062


XX-MSISDN: 639285020062


# Request headers
<IfModule !mod_headers.c>
 LoadModule headers_module modules/

# Copy the MSISDN to an internal variable
RewriteEngine On
RewriteCond %{HTTP:MSISDN} .*\s(.*)
RewriteRule .* - [E=MSISDN:%1]

# Set the XX-MSISDN header
RequestHeader set XX-MSISDN %{MSISDN}e
Philippine Linux Users' Group (PLUG) Mailing List (#PLUG @
Read the Guidelines:
Searchable Archives:

Reply via email to