We have just finished a migration job for a client of ours from an old .Net system in to Drupal, the last task of which was to write some Apache mod_rewrite conditions and rules to deal with the URLs of their old website. This proved to be more trouble than I thought, mainly because I struggled to find examples of how this might work.
Firstly, the ground work. The URL pattern to be redirected looked like this:
MainArticle.aspx?m=33818&amid=30301119