updated to handle local caching
This commit is contained in:
@@ -1,3 +1,14 @@
|
|||||||
|
<If "%{HTTP_HOST} =~ /(\.local|^localhost(:\d+)?$)/">
|
||||||
|
# Disable caching in dev
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
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
|
||||||
|
</IfModule>
|
||||||
|
FileETag None
|
||||||
|
</If>
|
||||||
|
|
||||||
<IfModule mod_deflate.c>
|
<IfModule mod_deflate.c>
|
||||||
# Enable on-the-fly compression for various file types.
|
# Enable on-the-fly compression for various file types.
|
||||||
AddOutputFilterByType DEFLATE application/javascript
|
AddOutputFilterByType DEFLATE application/javascript
|
||||||
@@ -54,10 +65,12 @@
|
|||||||
# Block access to .git directory
|
# Block access to .git directory
|
||||||
RewriteRule .*\.git/.* - [L,R=404]
|
RewriteRule .*\.git/.* - [L,R=404]
|
||||||
|
|
||||||
# Force HTTPS and www subdomain
|
<If "%{HTTP_HOST} !~ /(\.local|^localhost(:\d+)?$)/">
|
||||||
RewriteCond %{HTTPS} off [OR]
|
# Force HTTPS and www in prod
|
||||||
RewriteCond %{HTTP_HOST} !^www\. [NC]
|
RewriteCond %{HTTPS} off [OR]
|
||||||
RewriteRule ^ https://www.stemmechanics.com.au%{REQUEST_URI} [L,R=301]
|
RewriteCond %{HTTP_HOST} !^www\. [NC]
|
||||||
|
RewriteRule ^ https://www.stemmechanics.com.au%{REQUEST_URI} [L,R=301]
|
||||||
|
</If>
|
||||||
|
|
||||||
# Handle Authorization Header
|
# Handle Authorization Header
|
||||||
RewriteCond %{HTTP:Authorization} .
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
|||||||
Reference in New Issue
Block a user