<p>We are re-platforming for a client, and they are concerned about SEO. Their current site supports SEO friendly URLs, and so does the new platform. So for those, we are just going to create the same URL mapping. However, they have a large number of other URLs that are not SEO friendly that they want to permanently redirect. These do not follow a similar pattern, so one regex in an .htaccess won't cut it. What is the best way to handle this on a LAMP stack? The application has a front controller too, so I need to make sure that works along with the hard redirects.</p>

One approach (the one
I chose
) was to create a simple table of old urls and new ones, and then use
mod_rewrite
to read the table and perform redirects.  The table can live in a file external to the Apache config.
Alternatively, you could write a script to query a database if you wanted the table to live in a database.
This means you either need to manually create the mapping, or write some script to output this mapping file.