[Rails] Rewrite domain root to MainController#index
"Luis G. Gómez"
lgomez at vfxnetwork.com
Fri Nov 19 21:22:24 GMT 2004
Is there a way of preventing rewrite rules from rewriting
requests to domain root (http://www.example.com/) to "/controller/action"?
I want to hace a "main_controller.rb" hadle, among other actions,
"index" without showing the user "http://www.example.com/main/index" but
simply "http://www.example.com/".
I tried adding the following after lines 23, 33 and 39 respectively:
RewriteRule ^fcgi/$ /dispatch.fcgi?controller=main&action=index [QSA] [L]
RewriteRule ^mruby/$ /dispatch.rb?controller=main&action=index [QSA] [L]
RewriteRule ^$ / [R]
...bu nothing.
Actually I get
"Redirection limit for this url exceeded.
Unable to load the requested page.
This may be caused by cookies that are blocked."
I understand the message and why it happens but don't know how to get
what I want.
Has anyone tried tried doing this?
More information about the Rails
mailing list