Created
May 12, 2016 05:08
-
-
Save khoipro/4e67eb045f432bac68460f90def9f0d5 to your computer and use it in GitHub Desktop.
Font CSS Blocked - Cross-Origin Resource Sharing policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_headers.c> | |
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> | |
</IfModule> | |
<IfModule mod_mime.c> | |
# Web fonts | |
AddType application/font-woff woff | |
AddType application/vnd.ms-fontobject eot | |
# Browsers usually ignore the font MIME types and sniff the content, | |
# however, Chrome shows a warning if other MIME types are used for the | |
# following fonts. | |
AddType application/x-font-ttf ttc ttf | |
AddType font/opentype otf | |
# Make SVGZ fonts work on iPad: | |
# https://twitter.com/FontSquirrel/status/14855840545 | |
AddType image/svg+xml svg svgz | |
AddEncoding gzip svgz | |
</IfModule> | |
# rewrite www.example.com → example.com | |
<IfModule mod_rewrite.c> | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment