Skip to content

Instantly share code, notes, and snippets.

@conormcafee
Last active March 26, 2020 11:49
Show Gist options
  • Save conormcafee/066b9db49e5ac950ffc779729aff00d8 to your computer and use it in GitHub Desktop.
Save conormcafee/066b9db49e5ac950ffc779729aff00d8 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