10
Tim said
Quote:
I ask as I have some people hotlinking my images, stealing bandwith, I was just about to use .httaccess to stop this, but didn't want to run the risk of preventing proxy users, access.
If this myalbum module doesn't do this, can the module you mention prodect the whole uploads directory?
I don't want to restrict access to people hotlinking my site logo, as it helps promote the site.
If you have your logo as say a .png file and all other files as .gif, .jpg etc, then you can hotlink protect all files except your logo.
The rewrite rule for .htaccess is:
RewriteEngine on
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
put list of extensions in that you want to protect, leave out the ones you don't!
You can enhance the protection by
a/ allowing people to access image files directly by typing the URL in browser by adding
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
b/ adding specific sites that may access your images
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
You may want to add teh major search engines to the allowable list if you want your images indexing by them.
This all supposes of course that that your server supports the rewrite rules. (and if it doesn't, please don't ask me how - I don't know - speak to your system admin.)