Topic: htaccess?
How do I prevent the naughty users from stealing the avatar links. I'm running Apache so the easiest way doing this would be using .htaccess.
But, I'm not a genius so I could use some help
Thanks
You are not logged in. Please login or register.
PunBB Forums → Programming → htaccess?
How do I prevent the naughty users from stealing the avatar links. I'm running Apache so the easiest way doing this would be using .htaccess.
But, I'm not a genius so I could use some help
Thanks
Try this one:
Options All -Indexes
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ http://www.google.com [R,NC]
Change the line containing domain.com to your domain name
Edit: Change the last line containing google.com to http://www.yourdomain.com/hotlink-warning.gif. This way you can replace the hotlinked image to another (nasty?) one.
Also note that if you don't get the right behaviour you might have go at the back of the last line and press ENTER and then save the .htaccess file.
I had this problem bugging me for quite some time before I found the solution.
PunBB Forums → Programming → htaccess?
Powered by PunBB, supported by Informer Technologies, Inc.