apache: Send request URI within HTTP header for static files

To fulfil the requirements of the PubSubHubbub 0.4 spec, I have to send a rel=self header for each file.

I'm now trying to do that with Apache's mod_headers and environment variables:

Header append Link '<http://example.org%{REQUEST_URI}e>; rel="self"'

This works as long the file is processed by PHP, but does not for static files (like *.htm) which are not processed by mod_php or any CGI process.

There does not seem to be a way to get a list of all current Apache environment variables, so I can't check which ones are actually available.

So my question is: How can I access the relative path of the current requested URL in the Header append directive?


Happens on Debian 7 with Apache 2.2.22-13+deb7u4.


Solution 1:

Nick Kew on the apache mailing list gave me an answer:

REQUEST_URI is a CGI environment variable. The variables are not avaiable for performance reasons if CGI is not used for a file.