crnr / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

hotlinking problem (htacess-restriction) #313

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello Ben,

for my dynamically generated graphics I use a subdomain like 
graphics.domain.com to implement these on my blog on the main url 
www.domain.com. I've add lines to the htaccess (on graphics.domain.com) to 
prevent hotlinking.

The entry looks like:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?domain\.com/ [NC]
RewriteRule .*\.(jpg|gif|png)$ - [F]

If I try to open theses graphics via timthumb the image shows nothing. Instead 
an error appears (if I open the timthumb-url manually):

"A TimThumb error has occured
The following error(s) occured:
The remote file is not a valid image.
Query String : 
src=http://graphics.domain.com/image.jpg&w=100&zc=1&q=85
TimThumb version : 2.8.5"

So, why these errors are there? The images are valid and available.

Regards
Sebastian

Original issue reported on code.google.com by Sebastia...@googlemail.com on 4 Jan 2012 at 11:26

GoogleCodeExporter commented 8 years ago
You've disabled hotlinking so TimThumb can not access the files to resize them

Original comment by BinaryMoon on 4 Jan 2012 at 7:35

GoogleCodeExporter commented 8 years ago
But not for my domain! So the hotlinking is NOT disabled for Timthumb, too.

Original comment by Sebastia...@googlemail.com on 4 Jan 2012 at 9:40