Forum

ImageReferer replacement question

Jason
20 September 2013, 14:41
Hugo,

Are the "ImageReferer" configuration for virtual hosts below okay?

Currently using version 9.2
UrlToolkit {
ToolkitID = domainone
Header Referer .*\.domainone.com/.* Return
Match .*(jpg|png|gif)$ Redirect http://www.domainone.com/nohotlink.jpg
}

UrlToolkit {
ToolkitID = domaintwo
Header Referer .*\.domaintwo.com/.* Return
Match .*(jpg|png|gif)$ Redirect http://www.domaintwo.com/nohotlink.jpg
}

So on...
Hugo Leisink
20 September 2013, 17:37
The rules are ok, but they can be bypassed. Just add a ?bla to the image URL and the filter won't work. I advice to place all images in a separate directory, for example 'images'. Change the pattern to match this directory.
UrlToolkit {
ToolkitID = domaintwo
Header Referer .*\.domain.com/.* Return
Match ^/images/ Redirect /nohotlink.jpg
}
Jason
22 September 2013, 04:08

Question about the rule: 'Header Referer .*\.domain.com/.* Return'

Which one, that rule apply to: 'domain.com' or 'www.domain.com' or both?


Hugo Leisink
22 September 2013, 15:47
*.domain.com applies to the rule. So, domain.com won't.
This topic has been closed.