title: How to hide the .html extension with Apache mod_rewrite
body: <p>I have a small number of static sites where I simply want to hide the <code>.html</code> extension:</p>
  <ul>
  <li>the URL <code>/foo</code> fetches the static file <code>/foo.html</code></li>
  <li>the browser still displays the URL <code>/foo</code></li>
  </ul>
  <p>The client can then send out bookmarks in the style <code>example.com/foo</code> rather than <code>example.com/foo.html</code>.</p>
  <p>It sounds very simple, and I've used <code>mod_rewrite</code> happily before (say with WordPress or for redirects), but this is proving much harder to crack that I thought. Perhaps I'm missing something really obvious, but I can't find a solution anywhere and I've been at it all day!</p>
  <p>We run our own server, so this can go wherever is the best place.</p>
  <p><strong>Addendum</strong></p>
  <p>The solution checked below worked fine. Then after running the site awhile I noticed two problems:</p>
  <ol>
  <li><p>all pages began to appear unstyled. I reloaded, cleared the cache, etc., but still no-style. I've had this trouble before, and can't locate the source.</p>
  </li>
  <li><p>There's a directory AND an HTML file named 'gallery', so the /gallery link shows a directory listing instead of the HTML file. I should be able to sort that one, but further tips welcome :-)</p>
  </li>
  </ol>