Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{REQUEST_URI} !/kurulum/ [NC]
    RewriteCond %{REQUEST_URI} !/index\.php$ [NC]
    RewriteCond %{REQUEST_URI} ^(.+)\.(?:php|html)$ [NC]
    RewriteRule ^ %1 [R=301,L,NE]

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

    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.+?)/?$ $1.php [L]

    RewriteRule ^ index.php [L]
</IfModule>

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

<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
</IfModule>
