# CPPC Field app API: every request goes to index.php.
Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On
    # Code folders are never served directly.
    RewriteRule ^(lib|vendor)(/|$) - [F,L]
    # Pass the Authorization header through to PHP.
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</IfModule>

<FilesMatch "\.(ini|md|txt|json|lock|log)$">
    Require all denied
</FilesMatch>

<IfModule mod_headers.c>
    Header always set X-Robots-Tag "noindex, nofollow"
</IfModule>
