Try with .htaccess in your root of the site, eg: /public_html - this is a hotlink protection, aka Your server as cloud and files to be linked directly to another page or with any other words, someone is using your hard work for free

Example, Jan is hot-linking files from GIT (but that's what for is made GitHub)
Those code will not prevent anyone from downloading those files, they just have to be downloaded only trough your site, any external linking will lead to 403 or nasty picture.
Code: Select all
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)example.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$ - [F]
3rd line - change example.com to your domain
4th line - describe which files should not be touched from outside the domain
in addition to this code block you can add and another line
Code: Select all
RewriteRule \.(gif|jpg)$ http://www.example.com/take-this-big-dick.gif [R,L]
where gif|jpg are the requested files, and example.com leads to the site with some nasty picture
Code: Select all
Options -Indexes
Options +FollowSymLinks
This should be added to prevent user to type domain.com/some-directory without empty index.html to see what's inside. 2nd line tells the application, to load symlinks - eg. on some hosting providers have symlink www pointing -> public_html
Code: Select all
<Limit GET POST>
order allow,deny
deny from xxx.xxx.xx.x
allow from all
</Limit>
the above lines are to ban specific IP address
@Ian - why the hell this stupid phpBB3 does not recognize BBCodes for displaying code and/or image ?
https://postimg.org/image/tja09nhxb/
That's usually how it looks with working code tag