I have a website for e.g.
And I have another subdomain for e.g.
Both my main and subdomain point to same directory which is public_html.
I want to block access to
Please note that this test.jpg is same file for both main and subdomain as they both point to same directory. So how do I block it for subdomain but not for main domain using .htaccess? Or is there any other way of doing that?