Hello

I would like to use "Header set " directive within Location directive.
But it doesn't work.
Example.
  <Location /home/iida/apache-2.4.43/htdocs>
      Header set Pragma no-cache
      Header set Cache-Control no-cache
  </Location>

But in Filematch or Directory directive,  "Header set" works.

  <FilesMatch "\.(html|htm)$">
    Header set Pragma no-cache
    Header set Cache-Control no-cache
  </FilesMatch>

As I read online manual,
https://httpd.apache.org/docs/current/en/mod/mod_headers.html
> Header
> Context:server config, virtual host, _directory_, .htaccess

> directory   A directive marked as being valid in this context may be
> used inside <Directory>, <Location>, <Files>, <If>, and <Proxy>
> containers in the server configuration files, subject to the
> restrictions outlined in Configuration Sections.

This document tells that I can use Header directive in "Location".

FYI, I have tested this on apache-2.4.43.

Masanari Iida

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to