bustardcelly/blog-to-markdown/master/dist/.htaccess - Htaccess File

bustardcelly/blog-to-markdown/master/dist/.htaccess

# grunt-markdown-blog autogenerates output directory based on source and destination
# could not specify a specific output structure. As such, this rewrite rule is to redirect
# users looking for previous posts to the autogenerated 'blog-posts' directory

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(d{4})/(.+)$ /blog/blog-posts/$1/$2 [L,R=301]
RewriteRule ^category/(.+)/$ /blog/blog-pages/category/$1.html [L,R=301]
RewriteRule ^feed(.*)?$ /blog/index.xml [L,R=301]
RewriteRule ^blog-posts/2014/so-long-wordpress.html$ /blog/blog-posts/2014/01/03/so-long-wordpress/index.html [L,R=301]

RewriteCond %{QUERY_STRING} ^feed=(.*)$ [NC]
RewriteRule ^/$ /blog/index.xml [NC,L,R=301]

# Expires

<IfModule mod_expires.c>

    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"

  # CSS
    ExpiresByType text/css                              "access plus 1 week"

  # Data interchange
    ExpiresByType application/json                      "access plus 0 seconds"
    ExpiresByType application/xml                       "access plus 0 seconds"
    ExpiresByType text/xml                              "access plus 0 seconds"

  # Favicon (cannot be renamed!)
    ExpiresByType image/x-icon                          "access plus 1 week"

  # HTML components (HTCs)
    ExpiresByType text/x-component                      "access plus 1 month"

  # HTML
    ExpiresByType text/html                             "access plus 0 seconds"

  # JavaScript
    ExpiresByType application/javascript                "access plus 1 week"

  # Manifest files
    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
    ExpiresByType text/cache-manifest                   "access plus 0 seconds"

  # Media
    ExpiresByType audio/ogg                             "access plus 1 week"
    ExpiresByType image/gif                             "access plus 1 week"
    ExpiresByType image/jpeg                            "access plus 1 week"
    ExpiresByType image/png                             "access plus 1 week"
    ExpiresByType image/svg+xml                         "access plus 1 week"
    ExpiresByType video/mp4                             "access plus 1 week"
    ExpiresByType video/ogg                             "access plus 1 week"
    ExpiresByType video/webm                            "access plus 1 week"

  # Web feeds
    ExpiresByType application/atom+xml                  "access plus 1 hour"
    ExpiresByType application/rss+xml                   "access plus 1 hour"

  # Web fonts
    ExpiresByType application/font-woff                 "access plus 1 month"
    ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
    ExpiresByType application/x-font-ttf                "access plus 1 month"
    ExpiresByType font/opentype                         "access plus 1 month"
    ExpiresByType image/svg+xml                         "access plus 1 month"

</IfModule>

# Compression

AddOutputFilterByType DEFLATE application/atom+xml 
                              application/javascript 
                              application/x-javascript 
                              application/json 
                              application/rss+xml 
                              application/vnd.ms-fontobject 
                              application/x-font-ttf 
                              application/font-woff 
                              application/x-web-app-manifest+json 
                              application/xhtml+xml 
                              application/xml 
                              font/opentype 
                              image/svg+xml 
                              image/x-icon 
                              text/css 
                              text/html 
                              text/plain 
                              text/x-component 
                              text/javascript 
                              text/xml

On Github License

Files

Download PDF of Htaccess file
DEFLATE, QUERY_STRING

Comments

Apache