Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
  RewriteEngine On

  # Clean URLs: /pricing -> pricing.php
  RewriteRule ^sitemap\.xml$ sitemap.php [L]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([a-z0-9-]+)/?$ $1.php [L]
</IfModule>

# Content and config are readable by PHP, never by the web.
<FilesMatch "\.(php)$">
  <IfModule mod_authz_core.c>
    Require all granted
  </IfModule>
</FilesMatch>

<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
  Header set X-Frame-Options "SAMEORIGIN"
  Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml
</IfModule>

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType image/svg+xml "access plus 1 month"
</IfModule>
