# chekiPawa: front controller
Options -Indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
# force https + no www on the live domain
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?chekipawa\.co\.ke$ [NC]
RewriteRule ^ https://chekipawa.co.ke%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.chekipawa\.co\.ke$ [NC]
RewriteRule ^ https://chekipawa.co.ke%{REQUEST_URI} [L,R=301]
RewriteRule ^sw\.js$ - [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.php [L,QSA]
</IfModule>
# never expose code/config
<FilesMatch "^(\.env.*|.*\.(json|log|md|example))$">
  Require all denied
</FilesMatch>
<IfModule mod_headers.c>
<FilesMatch "\.(css|js|svg|png|woff2)$">Header set Cache-Control "public, max-age=2592000"</FilesMatch>
<Files "sw.js">Header set Cache-Control "no-cache"
Header set Service-Worker-Allowed "/"</Files>
</IfModule>
<IfModule mod_deflate.c>AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml</IfModule>
