RewriteEngine On RewriteCond %{REQUEST_FILENAME} !.+.php$ [NC] RewriteRule ^index.php?topic=(.*)$ $1.php [QSA,L]