I have a catalog of images that are alternately viewed directly in the browser and downloaded at another time.
So let's say I have the file / gallery / gal _4254.jpg.
I want to make / download / gal _4254.jpg start loading the image, and not view it. / Download is empty, all images are in / gallery.
I can match download directory requests with other files successfully
<Directory /var/www/download>
RewriteEngine on
RewriteRule (.*)$ /gallery/$1
</Directory>
and I can already force upload files to the gallery gallery by setting
<Directory /var/www/gallery/>
ForceType "image/jpg"
Header set Content-Disposition "attachment"
</Directory>
therefore setting the headers is not a problem. I don’t want the gallery to have headers at all, it just asks for / gallery / * through / download /, which are being overwritten.
, , .
<Directory /var/www/download>
ForceType "image/jpg"
Header set Content-Disposition "attachment"
RewriteEngine on
RewriteRule (.*)$ /gallery/$1
</Directory>
. , , .
, Apache?
, PHP, " ". PHP.