How to prevent a font download

Hello !

Do you know any lines to add in the htaccess to prevent the downloading of the fonts ?
Like having an error page on font hotlinkā€¦

Thank you !

Thats not strictly a Kirby question but 5 seconds on Google found this https://gist.github.com/grayghostvisuals/4465536

1 Like

I tried this oneā€¦ and a lot others however it still doesnā€™t workā€¦

This should work :

RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain\.com/.*$ [NC]
RewriteRule \.(woff2|woff|otf|ttf|eot|svg)$ index.php [L]
Options -Indexes 
1 Like

You missed out woff2 format:

RewriteRule \.(woff2|woff|ttf|eot|svg|otf)$ index.php [L]

Oops. Just added it. :slight_smile:

Now it works !

Thanks ! :slight_smile: