Skip to content

Instantly share code, notes, and snippets.

@nathansmith
Created October 1, 2011 03:33
Show Gist options
  • Save nathansmith/1255555 to your computer and use it in GitHub Desktop.
Save nathansmith/1255555 to your computer and use it in GitHub Desktop.
Route extension-less files to HTML.
# Route extension-less URLs to the equivalent *.html file.
# For instance: example.com/about = example.com/about.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment