João_Assad_4295
Nov 18, 2005Nimbostratus
hotlink prevention
I' made iRule to prevent image hotlinks to our site
when HTTP_REQUEST {
set referer [HTTP::header Referer]
set refer_host [URI::host $referer]
set uri [HTTP::uri]
if { not [matchclass $refer_host contains $::allowed_referers] and $refer_host ne "" } {
log local0. "hotlink detected: $referer"
STATS::incr site_stats hotlinks_detected
HTTP::respond 301 "Location" "http://www.oursite.com/images/no_hotlink.gif"
}
}
Its working fine but I'd like to make the replacement image be also a link and can't figure out how. Is it possible ? Any ideas ?
Regards,
João Assad