Skip to content

Instantly share code, notes, and snippets.

@eddievlagea
Forked from nathansmith/.htaccess
Created October 1, 2011 10:36
Show Gist options
  • Save eddievlagea/1255859 to your computer and use it in GitHub Desktop.
Save eddievlagea/1255859 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