Skip to content

Instantly share code, notes, and snippets.

@turlockmike
Last active August 29, 2015 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turlockmike/7abc9f35d0f9d696e699 to your computer and use it in GitHub Desktop.
Save turlockmike/7abc9f35d0f9d696e699 to your computer and use it in GitHub Desktop.
Redirect any path ending in .html to the same path without the .html
Rails.application.routes.draw do
get '(*path).html', to: redirect('%{path}')
post '(*path).html', to: redirect('%{path}')
#......
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment