RewriteEngine On

# Sempre servir o QR como PNG dinâmico (evita sumir no hosting)
RewriteRule ^img/qr\.png$ api/qr_png.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]