PDA

View Full Version : Protect Pictures in vBGallery


yuriy
01-26-2007, 03:22 AM
hello, my friend own a vbgallery v2 he asked me a question, about um somewhere in .htaccess file, like you put it inside /gallery folder and it protects your images from being hot linked to other sites, like only the gallery module can access it, if you click Photos, Category, Picture, then you can see the images, but if you type /gallery/images/2/coolrock.jpg It will say like Your are Forbidden to access this file on this server. someone please help me, Thank you!!

DemonOuterverse
01-29-2007, 12:02 AM
I haven't done it in a long time myself, but using RewriteCond's, you can achieve it.

Here's a site that explains how to set it up. [link (http://altlab.com/htaccess_tutorial.html)]

KW802
01-29-2007, 12:05 AM
hello, my friend own a vbgallery v2 he asked me a question, about um somewhere in .htaccess file, like you put it inside /gallery folder and it protects your images from being hot linked to other sites, like only the gallery module can access it, if you click Photos, Category, Picture, then you can see the images, but if you type /gallery/images/2/coolrock.jpg It will say like Your are Forbidden to access this file on this server. someone please help me, Thank you!!If your friend owns vBGallery then he should know that creating .htaccess files is a stock feature of the current versions.

yuriy
01-30-2007, 04:25 PM
This is what I see in /gallery/files .htaccess

but I tried online Hotlinking tool and I check the image url and it still displays the image

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?website.net(/)?.*$ [NC]
RewriteRule .*\.(avi|AVI|bmp|BMP|gif|GIF|jpeg|JPEG|jpg|JPG|mid i|MIDI|mp3|MP3|mpeg|MPEG|mpg|M PG|png|PNG|ram|RAM|wav|WAV|wma|WMA|wmv|WMV)$ [F,NC]

Please help me.

bheo
03-29-2007, 10:13 AM
restart your apache or check setting your httpd.conf if you have access

if not contact your helpdesk ;)