How can I route /foo to display /public/foo.html in Rails?
You can do this:
Add this, into your routes.rb file.
match '/foo', :to => redirect('/foo.html')   Update
In Rails 4, it should use "get", not "match":
get '/foo', :to => redirect('/foo.html')   thanks Grant Birchmeier
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With