Need Help > .htacces anti leech problem

1

19w08

Guest
Hi Guys,

This is what i am trying to use to protect my gfx for a new project.

But im guessing that i am doing something wrong cause when i try to acces
my files i get a Forbidden problem.

So i guess it works to good :D

Now i know a little bit of .htacces but i cant figure this one out.
Anyone an idea?

AuthUserFile /dev/null
AuthGroupFile /dev/null
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^http://.*mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ip.ip.ip.ip/.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.mysite.com/ [R,L]
 
try this
HTML:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://yousite.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yousite.com/ [NC]
RewriteRule [^/]+.(gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG)$ - [F]


bonus (if you want them to see an image or something):
HTML:
RewriteRule [^/]+.(gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG)$ http://www.yoursite.com/GTFO.jpg [R,L]
 
Back
Top