RewriteEngine On
RewriteBase /ktmkayit/

# Block direct access to includes/config
RewriteRule ^(includes|config)/.*\.php$ - [F,L]

# login -> login.php
RewriteRule ^login$ login.php [L]

# If file or dir doesn't exist, append .php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]
