# Root security and routing
<IfModule mod_authz_core.c>
    <FilesMatch "^\.(env|git)">
        Require all denied
    </FilesMatch>
    <FilesMatch "^composer\.(json|lock)$">
        Require all denied
    </FilesMatch>
</IfModule>

<IfModule !mod_authz_core.c>
    <FilesMatch "^\.(env|git)">
        Order deny,allow
        Deny from all
    </FilesMatch>
    <FilesMatch "^composer\.(json|lock)$">
        Order deny,allow
        Deny from all
    </FilesMatch>
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^api/(.*)$ public/api/$1 [L,QSA]
    RewriteRule ^product/([^/]+)/?$ public/product.php?slug=$1 [L,QSA]
    RewriteRule ^sitemap\.xml$ public/sitemap.php [L]
    RewriteRule ^feeds/meta-products\.xml$ public/feeds/meta-products.php [L]
    RewriteRule ^feeds/google-products\.xml$ public/feeds/google-products.php [L]
</IfModule>

Options -Indexes
