Skip to content

Instantly share code, notes, and snippets.

@mskian
Forked from conormcafee/.htaccess
Created March 26, 2020 11:49
Show Gist options
  • Save mskian/1648a81a959b942f4237f56545ad2bb1 to your computer and use it in GitHub Desktop.
Save mskian/1648a81a959b942f4237f56545ad2bb1 to your computer and use it in GitHub Desktop.
Jekyll .htaccess for Apache Server
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)/$ $1.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*[^/]$ %{REQUEST_URI}/ [L,R=301]
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment