Forum Moderators: phranque
Is there any way to do a rediret from an image when it's hot-linked so that they're taken to the product page it appears one?
I'd guess not, but it can't hurt to ask.
Are you already blocking non-blank referrers that are not your own site? If so, return a low-resolution image with your URL in it instead -- that's one way to get a bit of benefit from it...
I use three levels of anti-hotlinking response:
1) Return a 403 response, yielding a broken image on the hotlinking site (most common)
2) Return alternate image with embedded link (less common, used where the site's traffic might actually convert)
3) Creative, scary, or spiteful substitute images -- Make 'em regret doing it, for a fast response (rarely used).
My use of these methods depends on how "serious" the hotlinked-to site is (e.g. e-commerce versus hobby site) and how much of a problem the hotlinking is causing.
You could also automate the process of changing your image links by using PHP or SSI to change the links on on your pages, and then using mod_rewrite to re-map the modified links back to the real files.
For example, take the current day, year, and month and mix that in with the actual image name. In mod_rewrite, check that the requested URL has the current day, month, year (allowing for transitions at midnight, etc.) and if so, strip them out, re-arrange what's left, and use that to get the right file.
We had a thread about doing this (last year?) and it might still be findable with a site search on "hotlink" with RewriteCond and TIME_DAY or TIME_WDAY or the other time variable names.
Jim
redirecting them to another page was discussed here before ..
[webmasterworld.com...]
hehe while I was trying to see if it could be done via PHP sucessfully ( I'd already found last years thread ) ..Jim mentioned it ( presume it was this one? ) ..
I think it could be done "semi successfully" ( with all of Jims previous caveats ) with htaccess and PHP and better with perl ( but my perl isn't good enough )..anyone got a 100% working redirect for specific referrers?
edit spelling
[edited by: Leosghost at 1:25 am (utc) on Dec. 2, 2006]
No, the one I had in mind is here [webmasterworld.com]. It discusses a method to make image links that are only valid for three hours.
Jim