In the global config section for Apache 2.2.15, I have the following (per recommendation)
<IfModule mod_headers.c>
Header add Strict-Transport-Security "max-age=15768000;includeSubDomains" env=HTTPS
</IfModule>
I would like to add this header only when the request is NOT for a specific host (dev.host.com). Which directive do I use to make header add occur only when not for a specific host?
PS: The second part of this question has been moved.
If you only include the IfModule directive in a VirtualHost Directive for x.x.x.x:443, then it will only apply to that VirtualHost, and there only apply to the https protocol.
You could try the directive
In Apache 2.2 you can probably play with something like bellow.
Set an env to identify general case and exclude specific case:
then conditionnally set headers: