Hi,
We wish to block people from directly linking to images on our server. We
basically know how to do this for each Virtual host in the httpd.conf file.
What we would like to know is can we edit the srm.conf so that it covers all
VirtualHosts on the server? It would be a lot easier than having to edit
each VirtualHost section in the httpd.conf .
Here is the snippet of code we are using and if this is possible, could
someone please tell us how to modify this in order for it to work with the
srm.conf. Which one of these should we use?
Also, with the second example below, would this replace the image being
called with a specified image on the server? Maybe someone could be so kind
as to explain to us what the second example does specifically.
Is there also a way when doing this for a single site, to exclude a
directory and allow direct linking to images only in the specified
directory?
Example 1
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.quux-corp.de/~quux/.*$ [NC]
RewriteRule .*\.gif$ - [F]
Example 2
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !.*/foo-with-gif\.html$
RewriteRule ^inlined-in-foo\.gif$ - [F]
Thanks In Advance,
Charlie