How are you doing the rewrite? I do this same practice all the
time. It’s pretty simple. In the action for home you check if they
need to login if they do, then use this snippet:
redirect_to :controller => “login”, :action => “login”
This causes a 302 status code with the correct target url.
Thanks for the replies. To explain the full problem. I run my site on
a shared host, I know it’s not ideal, but it is cheap. To achieve this
I have to run Mongrel using a different port from 80 as my hosting
company has Apache running on port 80. So the URI looks like this:
Same problem (but with v. 2.3.8) and same solution (downgrade to 2.3.5).
(With glesys.se VPS, Ubuntu 8.04, monit+mongrel)
Thanks a lot!
Got same problem on Rails 2.3.8, running FreeBSD 7.0, Mongrel 1.1.5
(using clusters). Downgrading to Rails 2.3.5 solved this problem. I
believe it’s a combination with mongrel since the same code works
flawlessly on passenger.
I also got errors (ActionController::InvalidAuthenticityToken). I tried
clearing cache, restarting server, … but nothing seemed to work.
Downgrading to 2.3.5 solved this issue as well.