I have the following htaccess file:
<filesMatch "\.png$">
<ifModule mod_headers.c>
Header set Cache-Control "public"
Header set Content-Description "File Transfer"
Header set Content-Disposition "attachment"
Header set Content-Type "image/png"
Header set Content-Transfer-Encoding "binary"
</ifModule>
</filesMatch>
I’d like to test the %{QUERY_STRING} instead of performing a filesmatch. Is that possible?
You’re not going to be able to do this using only your htaccess file. You’re going to need to write a script or something to set the headers, then map requests to the script using something like this:
Then in your image_dl.php script: