RewriteEngine On RewriteCond %{QUERY_STRING} (.*) RewriteRule ^index.php$ %1.php [QSA,L]