Jump to content

Local referers


bigheadedd

Recommended Posts

Hi,

 

I'm currently hosting some fonts on my website for use with @font-face, and have restricted access to them via my website only. However I have multiple domains. How can I add multiple domains to this piece of code? Sorry, bit out of my depth when it comes to the syntax of these things!

 

SetEnvIf Referer example-domain\.co.uk localreferer
<FilesMatch \.(eot|woff|ttf|svg)$>
Order deny,allow
Deny from all
Allow from env=localreferer
</FilesMatch>

 

Thanks in advance

Edd

Link to comment
Share on other sites

You just need to define multiple variables, then use multiple allow clauses, eg;

 

SetEnvIf Referer foo\.com foo_referer
SetEnvIf Referer example-domain\.co.uk example_referer
<FilesMatch \.(eot|woff|ttf|svg)$>
Order deny,allow
Deny from all
Allow from env=foo_referer
Allow from env=eample_referer
</FilesMatch>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.