Protect webfonts with .htaccess from subdomain

i have to protect web fonts from being downloaded — but of course they should load on my site (via @font-face).

I have the following code:

# Prevent from downloading fonts
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://sub.domain.com [NC]
RewriteRule .(woff|eot)$ - [NC,F,L]

It does not work, because I AM able to download the fonts.

What is wrong?

Thanks in advance!


Source: .htaccess

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.