-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dc5e55
commit 7712041
Showing
7 changed files
with
83 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,54 @@ | ||
<Files ~ "config.json$"> | ||
Order allow,deny | ||
Deny from all | ||
</Files> | ||
</Files> | ||
|
||
# BROWSER CACHING USING CACHE-CONTROL HEADERS | ||
<ifModule mod_headers.c> | ||
# One year for image and video files | ||
<filesMatch ".(flv|gif|ico|jpg|jpeg|mp4|mpeg|png|svg|swf|webp)$"> | ||
Header set Cache-Control "max-age=31536000, public" | ||
</filesMatch> | ||
|
||
# One month for JavaScript and PDF files | ||
<filesMatch ".(js|pdf)$"> | ||
Header set Cache-Control "max-age=2592000, public" | ||
</filesMatch> | ||
|
||
# One week for CSS files | ||
<filesMatch ".(css)$"> | ||
Header set Cache-Control "max-age=604800, public" | ||
</filesMatch> | ||
</ifModule> | ||
|
||
# gzip compression - https://gtmetrix.com/enable-gzip-compression.html | ||
<IfModule mod_deflate.c> | ||
# Compress HTML, CSS, JavaScript, Text, XML and fonts | ||
AddOutputFilterByType DEFLATE application/javascript | ||
AddOutputFilterByType DEFLATE application/rss+xml | ||
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | ||
AddOutputFilterByType DEFLATE application/x-font | ||
AddOutputFilterByType DEFLATE application/x-font-opentype | ||
AddOutputFilterByType DEFLATE application/x-font-otf | ||
AddOutputFilterByType DEFLATE application/x-font-truetype | ||
AddOutputFilterByType DEFLATE application/x-font-ttf | ||
AddOutputFilterByType DEFLATE application/x-javascript | ||
AddOutputFilterByType DEFLATE application/xhtml+xml | ||
AddOutputFilterByType DEFLATE application/xml | ||
AddOutputFilterByType DEFLATE font/opentype | ||
AddOutputFilterByType DEFLATE font/otf | ||
AddOutputFilterByType DEFLATE font/ttf | ||
AddOutputFilterByType DEFLATE image/svg+xml | ||
AddOutputFilterByType DEFLATE image/x-icon | ||
AddOutputFilterByType DEFLATE text/css | ||
AddOutputFilterByType DEFLATE text/html | ||
AddOutputFilterByType DEFLATE text/javascript | ||
AddOutputFilterByType DEFLATE text/plain | ||
AddOutputFilterByType DEFLATE text/xml | ||
|
||
# Remove browser bugs (only needed for really old browsers) | ||
BrowserMatch ^Mozilla/4 gzip-only-text/html | ||
BrowserMatch ^Mozilla/4\.0[678] no-gzip | ||
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | ||
Header append Vary User-Agent | ||
</IfModule> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters