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
https://forums.phpfreaks.com/topic/254486-local-referers/
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
https://forums.phpfreaks.com/topic/254486-local-referers/#findComment-1304867
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.