DarkDelight.net
Sun 10th Aug '03, 11:46am
I have a slight hotlinking problem which I can't quite seem to pin down.
In my forums images directory there is a .htaccess file redirecting requests from other sites (or so I thought) to another image.
This appears to work fine when I try to post here with one of those images but it breaks down when I use a local file on my computer to do it.
Could you try it and see what happens when you call an image in a html document on your desktop?
This is the image linked to in this post:
<img src="http://forums.darkdelight.net/images/5stars.gif">
<img src="forums.darkdelight.net/images/5stars.gif">
When I try this, the first instance shows the image without redirecting and the second is broken.
Here is a call to the same 5stars image which should be redirected.
http://forums.darkdelight.net/images/5stars.gif
This is what I have in the .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://12.345.678.90.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://forums.mydomain.tld.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.tld.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.tld.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG|png|PNG|jpe|JPE|jpeg|JPEG|bmp |BMP |php|PHP)$ http://www.mydomain.tld/naughty_img.ext [R,L]
</IfModule>
Does anyone know why this is not working correctly?
Thanks.
In my forums images directory there is a .htaccess file redirecting requests from other sites (or so I thought) to another image.
This appears to work fine when I try to post here with one of those images but it breaks down when I use a local file on my computer to do it.
Could you try it and see what happens when you call an image in a html document on your desktop?
This is the image linked to in this post:
<img src="http://forums.darkdelight.net/images/5stars.gif">
<img src="forums.darkdelight.net/images/5stars.gif">
When I try this, the first instance shows the image without redirecting and the second is broken.
Here is a call to the same 5stars image which should be redirected.
http://forums.darkdelight.net/images/5stars.gif
This is what I have in the .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://12.345.678.90.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://forums.mydomain.tld.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.tld.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.tld.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG|png|PNG|jpe|JPE|jpeg|JPEG|bmp |BMP |php|PHP)$ http://www.mydomain.tld/naughty_img.ext [R,L]
</IfModule>
Does anyone know why this is not working correctly?
Thanks.