I am going to move my web application to a new domain name and want to use 301 permanent redirect for all incoming traffic to the old domain name.
I was going to use a before_filter in the application controller that does a permanent redirect. I was wondering how exactly I would write this to catch all urls and pass them 'as is' to the new domain name.
I am aware this can be done through apache or higher level, but I wanted to know how I would do this from the web application if I needed to.