I am converting my old ASP.NET sites to Ruby on Rails sites and I wanted to know the best way to redirect the old .aspx pages to Ruby on Rails routes using the same domain. The new Ruby on Rails version of the site is on a different server but I obviously want the domain to be the same. For example, how do I redirect www.mydomain.com/product.aspx?productid=1 to www.mydomain.com/product/1 while the domain/DNS is transferred to the new server where the Ruby on Rails app is hosted? I can easily just switch the DNS to the new server and everything would work fine but I don't get the SEO and legacy url benefit of having those old .aspx pages redirect to the new Ruby on Rails routes. The search engines would never know so I would lose all page ranking and would have to start all over again.
Any advice on the best way to approach this?