[ad_1]
I need to be able t not let using view the image by going www.domain.com/image/file.jpg
and the below code does that when the image is opened like above you get a 403
RewriteCond %{REQUEST\_URI} \^/actorimages/{.\*} \[NC\]
RewriteCond %{REQUEST\_URI} \\.(jpg|png)$ \[NC\]
RewriteRule \^/actorimages/(.\*)$ [www.google.com]) \[NC,U,QSA\]
​
But now the image does not display on the page and it gives a broken image
​
how to I allow it to be displayable on the page but disallow direct access to the image like above?
[ad_2]
The keywords you need to google are “prevent hotlinking htaccess”. Essentially you check the Referrer host header and if it isn’t your website, block the request.
You can also prevent hotlinking using Cloudflare.