Release sources by domain in . htaccess

Asked

Viewed 80 times

0

<FilesMatch "\.(ttf|otf|eot|woff|TTF)$">
    <IfModule mod_headers.c>
        SetEnvIf Origin "http(s)?://(www\.)?(siteneme.com.br|www.sitename.com.br)$" AccessControlAllowOrigin=$0
        Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
    </IfModule>
</FilesMatch>

Is there any way to release the fonts in a certain domain in . htaccess? Because this mode I’m doing works only when you put www.sitename.com.br but if it is in the browser and type sitename.com.br of error.

  • Which error occurs?

  • Font from origin 'http://www.sitename.com.br' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested Resource. Origin 'http://sitename.com.br' is therefore not allowed access.

  • I understand, I’ll try to help you, it’s a little difficult, I preferred the question not to lose her, as soon as I get put here ;)

  • Thanks :) to no ideas ja kkk

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.