Forum Discussion
João_Assad_4295
Nimbostratus
Nov 18, 2005hotlink 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
- unRuleY_95363Historic F5 AccountCan you explain what you mean by "make the replacement image be also a link"? I don't know what "the replacement image" is, so I can't really recommend how to make it a "link".
- jplopezy_118145
Nimbostratus
nice irule!
thanks
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects