Mailing List Archive

Preventing access to files except when linked
I have to serve a proprietary font for a web app (grr, spit!).
This should not be possible to download directly, but only when loaded
as part of a webpage.
They have recommended a .htaccess to achieve this:
RewriteEngine On
RewriteCond %{HTTP:Origin} !^$|http(s)?://(www\.)?domain\.com$ [NC]
RewriteRule \.(woff|eot)$ - [NC,L]
RewriteCond %{HTTP_REFERER} !.
RewriteRule \.(woff|eot)$ - [F,NC,L]
Options -Indexes

I am struggling to reproduce this in Cherokee.

I tried to start with the Anti-HotLinking behaviour, but if I type the
full URL manually then I can still reach the files (I guess because
the 403 error is only given when a referer is provided and it isn't in
this case).
I tried to modify this rule so that the 'header is provided' rule is
missed & it goes straight to looking at the contents of the header,
but this prevents Cherokee from starting (whether I make the change
via GUI or text-file).
Unfortunately there is no 'header is not provided' option, to allow me
to have 2 rules (block if not & bock if provided and not regex)

I am running the latest stable release: 1.2.101

Suggestions welcomed :)

Many thanks,
Fran.
_______________________________________________
Cherokee mailing list
Cherokee@lists.octality.com
http://lists.octality.com/listinfo/cherokee