Skip to content

Instantly share code, notes, and snippets.

@cleecm
Created September 12, 2013 01:31
Show Gist options
  • Save cleecm/6532149 to your computer and use it in GitHub Desktop.
Save cleecm/6532149 to your computer and use it in GitHub Desktop.

Revisions

  1. Alice Kærast created this gist Feb 25, 2011.
    26 changes: 26 additions & 0 deletions .htaccess
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    # ----------------------------------------------------------------------
    # Webfont access
    # ----------------------------------------------------------------------

    # allow access from all domains for webfonts
    # alternatively you could only whitelist
    # your subdomains like "sub.domain.com"

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

    # webfont mime types
    AddType application/vnd.ms-fontobject eot
    AddType font/truetype ttf
    AddType font/opentype otf
    AddType application/x-font-woff woff

    # webfonts and svg:
    <IfModule mod_deflate.c>
    <FilesMatch "\.(ttf|otf|eot|svg)$" >
    SetOutputFilter DEFLATE
    </FilesMatch>
    </IfModule>