I encountered this in my development environment using InstantRails, RadRails, Lighty, Windows XP, IE 6 & Firefox. I am running my application on port 3000.
Basically, I have a login screen that I set ssl_required for. No problem there. The problem was after I successfully logged in, I was getting a 404 page not found error when the plugin redirected it to http.
This patch fixed the problem for me:
def ensure_proper_protocol
return true if ssl_allowed?
if ssl_required? && !request.ssl?
redirect_to "https://" + request.host + request.request_uri
return false
elsif request.ssl? && !ssl_required?
redirect_to RAILS_ENV == ('production') ? "http://" + request.host + request.request_uri : "http://" + request.host + ":3000" + request.request_uri
return false
end
end
Probably, the port should not be hardcoded like this, but it fixed the problem.