0

I have a rails app deployed to heroku. I have a form on my index page that I would like to redirect to a static "thanks.html" page on submit.

The problem is that when I request the "thanks.html" the app is returning the index page instead. Logs show a 200 for the GET request as though "thanks.html" was found and returned.

Currently my "thanks.html" is in the public folder along with "index.html". I have no routes in place currently expecting that Rails will always return a matching static page from public when available with no additional configuration.

I did try the fix proposed in Routing to static html page in /public without success.

match '/foo', :to => redirect('/public/foo.html')

Any ideas on how to fix this?

Community
  • 1
  • 1
tjstevens
  • 11
  • 3

1 Answers1

1

I was using some extra config from the following article to add caching of the static pages. It appears that this is what was forcing all requests to my index.html page. I commented out the rack related info in config.ru and everything works fine. devcenter.heroku.com/articles/static-sites-on-heroku

tjstevens
  • 11
  • 3