mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
set Expires header on assets
This commit is contained in:
parent
1e32f43a4a
commit
f061fa46c7
1 changed files with 14 additions and 19 deletions
|
|
@ -3,23 +3,18 @@ AddType audio/mp4 m4r
|
||||||
AddType application/rss+xml rss
|
AddType application/rss+xml rss
|
||||||
AddOutputFilterByType DEFLATE application/rss+xml text/css application/javascript text/html
|
AddOutputFilterByType DEFLATE application/rss+xml text/css application/javascript text/html
|
||||||
|
|
||||||
#RewriteEngine on
|
# Turn on Expires and set default expires to 3 days
|
||||||
|
ExpiresActive On
|
||||||
#RewriteCond %{REQUEST_URI} ^.*\.html$
|
|
||||||
#RewriteRule ^(.*)\.html$ /$1 [R=301,L,NS]
|
|
||||||
|
|
||||||
# # Turn on Expires and set default expires to 3 days
|
|
||||||
# ExpiresActive On
|
|
||||||
# ExpiresDefault A259200
|
# ExpiresDefault A259200
|
||||||
#
|
|
||||||
# # Set up caching on media files for 1 month
|
# Set up caching on media files for 1 month
|
||||||
# <FilesMatch "\.(ico|gif|jpg|jpeg|png|pdf|mov|mp3)$">
|
<FilesMatch "\.(ico|gif|jpg|jpeg|png|pdf|mov|mp3)$">
|
||||||
# ExpiresDefault A2419200
|
ExpiresDefault A2419200
|
||||||
# Header append Cache-Control "public"
|
Header append Cache-Control "public"
|
||||||
# </FilesMatch>
|
</FilesMatch>
|
||||||
#
|
|
||||||
# # Set up 2 week caching on commonly updated files
|
# Set up 2 week caching on commonly updated files
|
||||||
# <FilesMatch "\.(xml|txt|html|js|css|rss)$">
|
<FilesMatch "\.(xml|txt|html|js|css|rss)$">
|
||||||
# ExpiresDefault A1209600
|
ExpiresDefault A1209600
|
||||||
# Header append Cache-Control "private, must-revalidate"
|
Header append Cache-Control "private, must-revalidate"
|
||||||
# </FilesMatch>
|
</FilesMatch>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue