Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Created March 20, 2012 00:15
Show Gist options
  • Save ttscoff/2128837 to your computer and use it in GitHub Desktop.
Save ttscoff/2128837 to your computer and use it in GitHub Desktop.
Redirect trailing slash to .html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*?/)?([^/]+)/$ http://www.domain.com/$1$2.html [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment