Nw,
Use caution with mega’s code as, without the second RewriteCond, the EVERYTHING atom in the RewriteRule could redirect to http://example.com/.html. IMHO, better to use:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule .? %{REQUEST_URI}.html [L]
Note that I did not make the test for “not a directory”, I did not need to escape the dot character in the second RewriteCond statement and I don’t care what the EVERYTHING atom captured because it was already contained in the {REQUEST_URI} variable.
More on mod_rewrite in a tutorial with abundant every day examples at http://dk.co.nz/seo.
Regards,
DK