I'm trying to hotlink protect a subdomain only, not main domain but i have no luck at all.
I have added following to file:
But it won't work when i direct visit image it still loads and i have now been googling for all kinds of solutions but it seems devs of directadmin has done something to prevent me being able to manually hotlink protect a subdomain through .htacces and doing it in panel enables hotlink protection on main domain and all subdomains, i don't want all subdomains and main domain to be hotlink protected. Only 1 single subdomain i want to be hotlink protected!
So does anyone here have solution to this?
I have added following to file:
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https://(test\.)?domain\.com [NC]
RewriteRule \.(jpg|jpe?g|gif|bmp|png)$ https://domain.com/404 [F,NC,L]
But it won't work when i direct visit image it still loads and i have now been googling for all kinds of solutions but it seems devs of directadmin has done something to prevent me being able to manually hotlink protect a subdomain through .htacces and doing it in panel enables hotlink protection on main domain and all subdomains, i don't want all subdomains and main domain to be hotlink protected. Only 1 single subdomain i want to be hotlink protected!
So does anyone here have solution to this?