Answer the question
In order to leave comments, you need to log in
Apache Image mapping via AliasMatch by HTTP_USER_AGENT condition - how?
Good afternoon!
The domain config has a condition for redirecting image requests to the HDD archive with them (works ok).
AliasMatch "^/wp-content/uploads/2019/../(..)(.*)$" "/mnt/hdd/dbimg/$1/$1$2"
AliasMatch "^/wp-content/uploads/2018/../(..)(.*)$" "/mnt/hdd/dbimg/$1/$1$2"
<Directory "/mnt/hdd/dbimg">
Require all granted
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|gif)$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?(mysite.com) [NC]
RewriteRule (.*) watermark.php?src=$1 [L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question