Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Wiki
  • .htaccess settings

.htaccess settings · Changes

Page history
page created -- documenting .htaccess settings on development server authored May 15, 2012 by pkra's avatar pkra
Hide whitespace changes
Inline Side-by-side
.htaccess-settings.md 0 → 100644
View page @ b5131b76
On the development server `devel.mathjax.org` (and also on the old CDN origin `dist.mathjax.org`) we use the following .htaccess file.
> These settings are appropriate for hosting MathJax on a CDN (with an apache server as origin).
```
# Define mime-types for fonts which aren't part of apache's config
AddType font/x-woff .woff
AddType font/opentype .otf
AddType font/ttf .ttf
# add gzip to all non-png resources
AddOutputFilter DEFLATE html xhtml css xml svg js eot otf ttf
# enable cross-site use of font-files
<FilesMatch "\.(svg|xml|ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
# Set a max-age of one day for caches
<IfModule mod_headers.c>
Header set Cache-Control "max-age=86400"
</IfModule>
```
\ No newline at end of file
Clone repository

MathJax Wiki

  • Contributing
  • Development
    • Development Process
      • Release Process Checklist
      • Hotfix Release Process
      • Documentation Update Process
      • Source Control Policies
    • Design Documents
      • MathJax Roadmap
      • CDN Hosting
        • Managing Rackspace Cloud Files & CDN
        • Directory Structure
        • .htaccess settings
        • Managing Amazon Cloudfront
      • Performance Discussion
      • Profiling and Diagnostics Tools
      • Configuration Options
      • Documentation generation guide
      • Testing