1
0
mirror of https://github.com/meineerde/holgerjust.de.git synced 2026-02-21 19:12:05 +00:00

Fix cache handling on uberspace

This commit is contained in:
Holger Just 2015-12-06 15:51:08 +01:00
parent 37cd0a7813
commit 929f2af56f
2 changed files with 20 additions and 13 deletions

20
source/.htaccess Normal file
View File

@ -0,0 +1,20 @@
---
noindex: true
---
# Compress files on the fly
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript
# Aggressively cache assets
ExpiresActive On
ExpiresDefault "access plus 1 year"
# Cache only very shortly on non cache-busted files
ExpiresByType text/html "access plus 1 hour"
ExpiresByType text/xml "access"
RewriteEngine On
# Require SSL
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

View File

@ -1,13 +0,0 @@
---
noindex: true
---
# Compress files on the fly
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript
# Aggressively cache assets, rely on ETAGs for non-cache busted stuff
<LocationMatch ^/(images|javascripts|fonts|stylesheets)/>
ExpiresActive On
ExpiresDefault "access plus 1 year"
</LocationMatch>
Alias /favicon.ico /images/favicon.ico