Options -Indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^sitemap\.xml$ sitemap.php [L]
RewriteRule ^kalori-rehberi/?$ index.php?r=calorie_guide [QSA,L,NC]
RewriteRule ^mutfak-ipuclari/?$ index.php?r=kitchen_tips [QSA,L,NC]
RewriteRule ^mutfak-ipuclari/([a-z0-9-]+)/?$ index.php?r=kitchen_tip&slug=$1 [QSA,L,NC]
RewriteRule ^robots\.txt$ robots.php [L]
RewriteRule ^kategori/([a-z0-9-]+)/([a-z0-9-]+)/?$ index.php?r=category&parent=$1&slug=$2 [QSA,L,NC]
RewriteRule ^kategori/([a-z0-9-]+)/?$ index.php?r=category&slug=$1 [QSA,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9][a-zA-Z0-9-]*)/?$ index.php?r=recipe&slug=$1 [QSA,L]
RewriteRule ^uploads/.*\.(php|phtml|phar)$ - [F,L,NC]
</IfModule>
<FilesMatch "^(config\.php|install\.lock|schema-v08\.lock|schema-v10\.lock|schema-v11\.lock|schema-v12\.lock)$">
Require all denied
</FilesMatch>


# Block web access to installation and migration utilities after deployment
<FilesMatch "^(config\.php|install\.lock|schema-v[0-9]+\.lock|calorie-guide-seed\.php|LICENSE\.txt|README\.md)$">
Require all denied
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteRule ^uploads/ - [E=UPLOADS_PATH:1]
RewriteRule ^uploads/.*\.(php[0-9]?|phtml|phar|cgi|pl|asp|aspx)(\..*)?$ - [F,L,NC]
</IfModule>
