Prohibit from other sites from using my content

0

Hello, I'm trying to develop an htaccess code that prevents other sites from using my content. I tried this, but without success, if I type in the browser certain file / link it becomes inactive even for me, being that it was to be for another person / site and in my site to be accessible normally.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?meusite\.com\.br/ [NC]
RewriteCond %{HTTP_REFERER} !^$RewriteRule .*\.(jpe?g|gif|bmp|png)$ /imagens/proibido.jpg [L]

Could anyone help me?

    
asked by anonymous 12.04.2018 / 18:27

1 answer

1

Good What you are looking for is called HotLink, which is a way to prohibit people from using your files, thus generating bandwidth usage. You can use a similar code like this

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|mp4|)$ - [NC,F,L]

If you do not activate it by cpanel (as you use cpanel) in

Hereyoucanreadanarticleaboutthesubject Hotlink what is it, and how to protect yourself

You can generate your custom .htaccess here

    
13.04.2018 / 19:55