how to redirect_to the index.html page

hi all

If I add in my code redirect_to :action => 'index' it redicrects to
the index method in the current controller.

how can I redirect it to the index.html page ?


Try redirect_to ‘index.html’

Jim Englert

Thank you for the example, I tied that

- redirect_to '/index.html'

and it worked

Hi Pepe, You should do the following:

redirect_to :controller => "index", :action => 'index'

Good luck,



Take a look at the API, you can redirect to an action, URL or plain

Cheers, Sazima

I'm having a similar problem that none of these solutions will work for.
I understand you can redirect to a URL, the problem is - while I'm
developing my app I want to redirect to ''but
after I deploy it I want it to redirect to something like
''. Is there a constant similar to 'RAILS_ROOT'
that I can use?

is redirect_to '/' good enough ? (or are you redirecting to a
different domain to the one you received the request on ?)