I would like .htaccess
to perform the following code ONLY if http_referer
is from google (.com/ .ru/ .co.uk /.co.in/ etc.). Is this possible?
<filesMatch ".(jpg|jpeg|png|gif)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</FilesMatch>
expr
directive is only available inapache-2.4.10
and later. Some server distributions, such as RedHat Enterprise Linux 7 runapache-2.4.6
allthough they usually provide an optional higher apache version. httpd.apache.org/docs/2.4/mod/mod_headers.html#header – Wheatley