Skip to content

Instantly share code, notes, and snippets.

@kristarella
Created December 10, 2012 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristarella/4254373 to your computer and use it in GitHub Desktop.
Save kristarella/4254373 to your computer and use it in GitHub Desktop.
htaccess: remove .html without breaking stuff in WP dashboard
# strip '.html' off any requests except in the dashboard
RewriteBase /
RewriteCond %{REQUEST_URI} !^/?(wp-admin|wp-includes)/(.*)$
RewriteRule ^(.*)\.html$ http://example.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment