Skip to content

Commit

Permalink
Merge pull request h5bp#768 from mathiasbynens/master
Browse files Browse the repository at this point in the history
.htaccess improvement: check if mod_headers is available before matching webfont files (instead of the other way around)
  • Loading branch information
Divya Manian committed Sep 18, 2011
2 parents e130ae3 + d8a3970 commit 994cd08
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .htaccess
Expand Up @@ -11,7 +11,7 @@


###
### If you run a webserver other than apache, consider:
### If you run a webserver other than Apache, consider:
### github.com/paulirish/html5-boilerplate-server-configs
###

Expand All @@ -26,11 +26,11 @@
# Use ChromeFrame if it's installed for a better experience for the poor IE folk

<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge,chrome=1"
# mod_headers can't match by content-type, but we don't want to send this header on *everything*...
<FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|xpi|safariextz|vcf)$" >
Header unset X-UA-Compatible
</FilesMatch>
Header set X-UA-Compatible "IE=Edge,chrome=1"
# mod_headers can't match by content-type, but we don't want to send this header on *everything*...
<FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|xpi|safariextz|vcf)$" >
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>


Expand All @@ -56,11 +56,11 @@
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".

<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
</FilesMatch>
</IfModule>



Expand Down

0 comments on commit 994cd08

Please sign in to comment.