RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^view_(.*).htm$ view.php?pg=$1 RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*).html$ local_links.php?cat=$1