modify Host header

modify Host header

am 27.03.2008 22:01:02 von Eqbal Z

------=_Part_18119_1684591.1206651662446
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I need to modify the Host header for my application in order to add the port
information.
I tried the following directive

RequestHeader set Host "%{HOST_NAME}e:443"

This sets it to (null):443

How do I get the host name value here? For example if the request comes in
as http://www.myhostname.com:8100/requested_resource
I am trying to get the www.myhostname.com part in the above directive by
using %{HOST_NAME}e

Any help is greatly appreciated.

Thanks.

------=_Part_18119_1684591.1206651662446
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I need to modify the Host header for my application in order to add the port information.

I tried the following directive

 

RequestHeader set Host "%{HOST_NAME}e:443"

 

This sets it to (null):443

 

How do I get the host name value here? For example if the request comes in as


I am trying to get the part in the above directive by using %{HOST_NAME}e

 

Any help is greatly appreciated.

 

Thanks.


------=_Part_18119_1684591.1206651662446--

RE: modify Host header

am 28.03.2008 11:52:26 von Jet.Wilda

Try=20

RequestHeader set Host "%{SERVER_NAME}:443"

~Jet

________________________________________
From: Eqbal Z [mailto:eqbalz@gmail.com]=20
Sent: Thursday, March 27, 2008 5:01 PM
To: users@httpd.apache.org
Subject: [users@httpd] modify Host header

I need to modify the Host header for my application in order to add the por=
t information.
I tried the following directive
=A0
RequestHeader set Host "%{HOST_NAME}e:443"
=A0
This sets it to (null):443
=A0
How do I get the host name value here? For example if the request comes in =
as http://www.myhostname.com:8100/requested_resource
I am trying to get the www.myhostname.com part in the above directive by us=
ing %{HOST_NAME}e
=A0
Any help is greatly appreciated.
=A0
Thanks.
----------
Learn more about Chase Paymentech Solutions,LLC payment processing services=
at www.chasepaymentech.com.

THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are =
proprietary and confidential information intended only for the use of the r=
ecipient(s) named above. If you are not the intended recipient, you may no=
t print, distribute, or copy this message or any attachments. If you have =
received this communication in error, please notify the sender by return e-=
mail and delete this message and any attachments from your computer.


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: modify Host header

am 28.03.2008 18:56:18 von Eqbal Z

------=_Part_12000_11413388.1206726979055
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

That does not work. If I do that, apache does not even start. I get the
error saying:
Unrecognized Header or RequestHeader directive %:

So I ended up doing this which seems to work. Can someone check my regex and
see if this is correct? I am trying to match any characters optionally
followed by a : followed by any characters. Then I am backreferencing
anything before the :.

SetEnvIf Host "([^:]*):?.*" MY_HTTP_HOST=$1
RequestHeader set Host "%{MY_HTTP_HOST}e:443"

On Fri, Mar 28, 2008 at 3:52 AM, Wilda, Jet
wrote:

> Try
>
> RequestHeader set Host "%{SERVER_NAME}:443"
>
> ~Jet
>
> ________________________________________
> From: Eqbal Z [mailto:eqbalz@gmail.com]
> Sent: Thursday, March 27, 2008 5:01 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] modify Host header
>
> I need to modify the Host header for my application in order to add the
> port information.
> I tried the following directive
>
> RequestHeader set Host "%{HOST_NAME}e:443"
>
> This sets it to (null):443
>
> How do I get the host name value here? For example if the request comes in
> as http://www.myhostname.com:8100/requested_resource
> I am trying to get the www.myhostname.com part in the above directive by
> using %{HOST_NAME}e
>
> Any help is greatly appreciated.
>
> Thanks.
> ----------
> Learn more about Chase Paymentech Solutions,LLC payment processing
> services at www.chasepaymentech.com.
>
> THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are
> proprietary and confidential information intended only for the use of the
> recipient(s) named above. If you are not the intended recipient, you may
> not print, distribute, or copy this message or any attachments. If you have
> received this communication in error, please notify the sender by return
> e-mail and delete this message and any attachments from your computer.
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

------=_Part_12000_11413388.1206726979055
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

That does not work. If I do that, apache does not even start. I get the error saying:

Unrecognized Header or RequestHeader directive %:

 

So I ended up doing this which seems to work. Can someone check my regex and see if this is correct? I am trying to match any characters optionally followed by a : followed by any characters. Then I am backreferencing anything before the :.


 

SetEnvIf Host "([^:]*):?.*" MY_HTTP_HOST=$1
RequestHeader set Host "%{MY_HTTP_HOST}e:443"


On Fri, Mar 28, 2008 at 3:52 AM, Wilda, Jet <> wrote:

Try

RequestHeader set Host "%{SERVER_NAME}:443"

~Jet

________________________________________

From: Eqbal Z [mailto:
Subject: [users@httpd] modify Host header





I need to modify the Host header for my application in order to add the port information.
I tried the following directive
 
RequestHeader set Host "%{HOST_NAME}e:443"
 
This sets it to (null):443

 
How do I get the host name value here? For example if the request comes in as part in the above directive by using %{HOST_NAME}e

 
Any help is greatly appreciated.
 
Thanks.
----------
Learn more about Chase Paymentech Solutions,LLC payment processing services at .


THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above.  If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments.  If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.



------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.

To unsubscribe, e-mail:

For additional commands, e-mail:




------=_Part_12000_11413388.1206726979055--

Re: modify Host header

am 28.03.2008 22:30:52 von Eqbal Z

------=_Part_12371_25051211.1206739852340
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I am running into a strage issue on one of the servers. I have tried it on
three servers so far and it works on two of them. On of the servers
MY_HTTP_HOST is being set as "$1" instead of $1 being replaced by the
backreference in the regular expression. Anyone have any idea why that could
be. The servers I have tried this on are supposed to have identical
configurations.

On Fri, Mar 28, 2008 at 10:56 AM, Eqbal Z wrote:

> That does not work. If I do that, apache does not even start. I get the
> error saying:
> Unrecognized Header or RequestHeader directive %:
>
> So I ended up doing this which seems to work. Can someone check my regex
> and see if this is correct? I am trying to match any characters optionally
> followed by a : followed by any characters. Then I am backreferencing
> anything before the :.
>
> SetEnvIf Host "([^:]*):?.*" MY_HTTP_HOST=$1
> RequestHeader set Host "%{MY_HTTP_HOST}e:443"
>
> On Fri, Mar 28, 2008 at 3:52 AM, Wilda, Jet <
> Jet.Wilda@chasepaymentech.com> wrote:
>
> > Try
> >
> > RequestHeader set Host "%{SERVER_NAME}:443"
> >
> > ~Jet
> >
> > ________________________________________
> > From: Eqbal Z [mailto:eqbalz@gmail.com]
> > Sent: Thursday, March 27, 2008 5:01 PM
> > To: users@httpd.apache.org
> > Subject: [users@httpd] modify Host header
> >
> > I need to modify the Host header for my application in order to add the
> > port information.
> > I tried the following directive
> >
> > RequestHeader set Host "%{HOST_NAME}e:443"
> >
> > This sets it to (null):443
> >
> > How do I get the host name value here? For example if the request comes
> > in as http://www.myhostname.com:8100/requested_resource
> > I am trying to get the www.myhostname.com part in the above directive by
> > using %{HOST_NAME}e
> >
> > Any help is greatly appreciated.
> >
> > Thanks.
> > ----------
> > Learn more about Chase Paymentech Solutions,LLC payment processing
> > services at www.chasepaymentech.com.
> >
> > THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments
> > are proprietary and confidential information intended only for the use of
> > the recipient(s) named above. If you are not the intended recipient, you
> > may not print, distribute, or copy this message or any attachments. If you
> > have received this communication in error, please notify the sender by
> > return e-mail and delete this message and any attachments from your
> > computer.
> >
> >
> > ------------------------------------------------------------ ---------
> > The official User-To-User support forum of the Apache HTTP Server
> > Project.
> > See for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>

------=_Part_12371_25051211.1206739852340
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I am running into a strage issue on one of the servers. I have tried it on three servers so far and it works on two of them. On of the servers MY_HTTP_HOST is being set as "$1" instead of $1 being replaced by the backreference in the regular expression. Anyone have any idea why that could be. The servers I have tried this on are supposed to have identical configurations.



On Fri, Mar 28, 2008 at 10:56 AM, Eqbal Z <> wrote:


That does not work. If I do that, apache does not even start. I get the error saying:

Unrecognized Header or RequestHeader directive %:

 

So I ended up doing this which seems to work. Can someone check my regex and see if this is correct? I am trying to match any characters optionally followed by a : followed by any characters. Then I am backreferencing anything before the :.


 

SetEnvIf Host "([^:]*):?.*" MY_HTTP_HOST=$1
RequestHeader set Host "%{MY_HTTP_HOST}e:443"





On Fri, Mar 28, 2008 at 3:52 AM, Wilda, Jet <> wrote:

Try

RequestHeader set Host "%{SERVER_NAME}:443"

~Jet

________________________________________

From: Eqbal Z [mailto:

Subject: [users@httpd] modify Host header




I need to modify the Host header for my application in order to add the port information.
I tried the following directive
 
RequestHeader set Host "%{HOST_NAME}e:443"
 
This sets it to (null):443

 
How do I get the host name value here? For example if the request comes in as part in the above directive by using %{HOST_NAME}e

 
Any help is greatly appreciated.
 
Thanks.
----------
Learn more about Chase Paymentech Solutions,LLC payment processing services at .


THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above.  If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments.  If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.



------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.

To unsubscribe, e-mail:

For additional commands, e-mail:





------=_Part_12371_25051211.1206739852340--