URL Redirects with Mongrel
From A2Wiki
.htaccess redirects will not work in Mongrel accelerated Rails applications, insetead you'll need to do the following:
- Create a file named
mongrel.confin your Rails app'sconfigdirectory. - Enter your redirects in this file in the following format (one per line):
redirect "/from_url", "/to_url"
- Stop mogrel:
cd ~ cd your_rails_app mongrel_rails stop
- Start mongrel specifying location of
mongrel.confwith-S:
cd ~ cd your_rails_app mongrel_rails start -S config/mongrel.conf -d -p [portno] -e production < /dev/null >& /dev/null exit
Where [portno] is the port number you were assigned for your Mongrel instance.
