I presently have this during my .htaccess file:

Options +FollowSymLinks  
RewriteEngine On    
RewriteRule ^(.*)\.html$ index.php?pagename=$1&%{QUERY_STRING}

The the html file title is rewritten towards the pagename query string.

However I am attempting to allow use of a particular static html file, so in some way I have to overwrite the rule or make the best.

Thank you for you help.

  1. No reason appending QUERY_STRING yourself you'll leave a stray & if there is not any, and mod_rewrite already includes a tool to get it done better:

    RewriteRule ^(.*)\.html$ index.php?pagename=$1 [QSA]

  2. You are able to control a RewriteRule having a RewriteCond that precedes it. For instance:

    RewriteCond %{REQUEST_URI} !^/staticpage.html$
    RewriteRule ^(.*)\.html$ index.php?pagename=$1 [QSA]

  3. Another helpful pattern is RewriteCond %{REQUEST_FILENAME} !-f that will bypass the next RewriteRule any time the URL might have matched up a current regular file within the docroot.