Options -Indexes
DirectoryIndex index.php

RewriteEngine On
RewriteRule ^sitemap\.xml$ sitemap.php [L]
RewriteRule ^products/([^/]+)/([^/]+)/?$ index.php?page=product&category=$1&slug=$2 [QSA,L]
RewriteRule ^products/?$ index.php?page=products [QSA,L]
RewriteRule ^admin/products/?$ index.php?page=admin-products [QSA,L]
RewriteRule ^admin/leads/?$ index.php?page=admin-leads [QSA,L]
RewriteRule ^admin/login/?$ index.php?page=admin-login [QSA,L]
RewriteRule ^admin/?$ index.php?page=admin [QSA,L]
RewriteRule ^(services|solutions|resources|projects|about|contact|quote|thanks)/?$ index.php?page=$1 [QSA,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

<Files "config.php">
    Require all denied
</Files>
