You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Csaba Kecse-Nagy <ke...@gmail.com> on 2013/02/12 09:42:12 UTC

[users@httpd] httpd2.2 mod_headers, need a directive for manipulate headers of non-success (non-2xx) responses

Hello,

I would like to construct a directive in my httpd.conf file that is for all
non-success responses of my site.
In the following link
http://httpd.apache.org/docs/2.2/mod/mod_headers.html#Header there is a
sentence which would be perfect if I could set: "You're adding a header to
a non-success (non-2xx) response, such as a redirect, in which case only
the table corresponding to always is used in the ultimate response."

Please help me constructing a directive section into the configuration file
that handles all not successful (non-2xx) responses. I would like to
manipulate some header parameters, something like this:

<LocationMatch "/">
      Header non-success unset Cookiename
</LocationMatch>

Thanks in advance.

Csaba

Re: [users@httpd] httpd2.2 mod_headers, need a directive for manipulate headers of non-success (non-2xx) responses

Posted by Igor Cicimov <ic...@gmail.com>.
On 12/02/2013 7:42 PM, "Csaba Kecse-Nagy" <ke...@gmail.com> wrote:
>
> Hello,
>
> I would like to construct a directive in my httpd.conf file that is for
all non-success responses of my site.
> In the following link
http://httpd.apache.org/docs/2.2/mod/mod_headers.html#Header there is a
sentence which would be perfect if I could set: "You're adding a header to
a non-success (non-2xx) response, such as a redirect, in which case only
the table corresponding to always is used in the ultimate response."
>
> Please help me constructing a directive section into the configuration
file that handles all not successful (non-2xx) responses. I would like to
manipulate some header parameters, something like this:
>
> <LocationMatch "/">
>       Header non-success unset Cookiename
> </LocationMatch>
>
> Thanks in advance.
>
> Csaba

You are looking after Status-Code header. Read here for its values
http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html