freeman-industries/reedsy-fun/master/dist/.htaccess
# Set expires and remove etags
<FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(.gz)?$">
Header set Expires "access plus 1 year"
Header unset ETag
FileETag None
</FilesMatch>
# Set cache-control header
<FilesMatch ".(ico|jpg|png|gif)(.gz)?$">
Header set Cache-Control "public"
</FilesMatch>
<FilesMatch ".(js|css)(.gz)?$">
Header set Cache-Control "private"
</FilesMatch>
# Enable GZip
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
# Rewrite all to index.html
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^(/img|/js|/css|/robots.txt|/favicon.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</ifModule>
On Github License
Files
Download PDF of Htaccess file