From be4fdb2f80ca9dab9c6425e08cc2e4d1435438a0 Mon Sep 17 00:00:00 2001 From: James Collins Date: Thu, 28 Aug 2025 20:03:30 +1000 Subject: [PATCH] updated to handle local caching --- public/.htaccess | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/public/.htaccess b/public/.htaccess index 701146d..dd8e996 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,3 +1,14 @@ + + # Disable caching in dev + + Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0" + Header set Pragma "no-cache" + Header set Expires "0" + Header unset ETag + + FileETag None + + # Enable on-the-fly compression for various file types. AddOutputFilterByType DEFLATE application/javascript @@ -54,10 +65,12 @@ # Block access to .git directory RewriteRule .*\.git/.* - [L,R=404] - # Force HTTPS and www subdomain - RewriteCond %{HTTPS} off [OR] - RewriteCond %{HTTP_HOST} !^www\. [NC] - RewriteRule ^ https://www.stemmechanics.com.au%{REQUEST_URI} [L,R=301] + + # Force HTTPS and www in prod + RewriteCond %{HTTPS} off [OR] + RewriteCond %{HTTP_HOST} !^www\. [NC] + RewriteRule ^ https://www.stemmechanics.com.au%{REQUEST_URI} [L,R=301] + # Handle Authorization Header RewriteCond %{HTTP:Authorization} .