QuoteI think you can drop an .htaccess file in the directory(ies) and limit which sites are allowed to hotlink off of you site.
Code:
LoadModule rewrite_module libexec/mod_rewrite.so
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$ [NC]
In mine I have to do both http://yoursite.com and http://www.yoursite.com to work. I could be wrong but i think that would work. Also, I am also not sure at what level you would want to drop it into your site but I think it would be the root folder.
will this work? i just want to try and keep others from saveing my files easyly and hot linking
preventing people from saving your files, no it won't help.
preventing people from hot linking, yes it will help.
Put it in the "albums" folder.
LoadModule rewrite_module libexec/mod_rewrite.so
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/*.*/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.ws/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.ws/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.ws/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysiteip/.*$
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/index.php.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$ [NC]
with and with out the [NC] and get same error
error being no imagesworking on thr page in the album folder
Here.... This is what I use:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?photo.enctu.org(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?stunion.enctu.org(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|tif|png)$ http://photo.enctu.org/noleech.jpg [R,NC]
http://photo.enctu.org/noleech.jpg is the picture that appears when they try to hotlink.
Also, make sure url rewriting is enabled on your server.
just copy and edit ?
or do I need the extra stuff in the top bar
In what directorie i must put this htaccess?
albums folder will do.
GauGau
When i put the .htaccess to protect my images i dont see the images in my web site, broken thumbnails, etc... :( :roll: What can i do? Only if i delete the .htaccess the gallery runs well. . .. .
post the code of the .htaccess file you used here.
GauGau
I tried all in htaccess my server has rewrite mode ON This is the php info of my server http://www.cremita.com/phpinfo.php and i dont know what fails but i get (forbidden acess to the server error) you are not authorized to... I cant see the images in the web of /album when .htaccess is here, please help me, i really need to do that.