# Disable directory listing
Options -Indexes

# Enable Rewrite Engine
RewriteEngine On

# If the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite URL without .php extension
RewriteRule ^([^/]+)/?$ $1.php [L]
