Skip to content

Instantly share code, notes, and snippets.

@dawnerd
Created August 24, 2012 23:09
Show Gist options
  • Save dawnerd/3456942 to your computer and use it in GitHub Desktop.
Save dawnerd/3456942 to your computer and use it in GitHub Desktop.
RewriteEngine on
RewriteBase /
RewriteCond % {REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html
RewriteRule ^/([^/]+)\.html$ /$1/ [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment