After reading
this post, I have a hypothetical question about macros. I
already know how to make a macro that match a file extension in a URL (for example:
{.match|*.jpg;*.gif|%url%.}), but
I don't know how to ONLY match a 'Content-Type' found in a header. (I've read the
Wiki, but found nothing relevant to my question)
I've tried with the following, without success:
[pre-filter-request]
{.if|{.match|*text/html*|{.header|Content-Type.}.}|{:
{.add to log|Web page was served.}
{.add header|Expires: 1.}
:}.}
My idea is
ONLY match requests, with any of these headers:
Content-Type:"text/html; charset=utf-8"and/or
Content-Type:"text/html"Do you know how to ONLY match a header, with a 'Content-Type' of 'text/html'?.
I do NOT want to match files with *.html or *.htm extension (I repeat: I do NOT want to filter or match files by extension). The type of 'Content-Type' was only an example, but it can be any other type.
What am I doing wrong?...