We're re-platforming for any client, and they're worried about Search engine optimization. Their current site supports Search engine optimization friendly Web addresses, and thus does the brand new platform. So for individuals, we're just likely to produce the same URL mapping. However, they've a lot of other Web addresses that aren't Search engine optimization friendly that they would like to permanently redirect. These don't consume a similar pattern, so one regex within an .htaccess will not work. What's the easiest method to handle this on the Light stack? The applying includes a front controller too, so I have to make certain that actually works together with hard redirects.

One approach (the main one I chose) was to produce a simple table of old web addresses and brand new ones, after which use mod_rewrite to see the table and perform redirects. The table can reside in personal files exterior towards the Apache config.

Alternatively, you can write a script to question a database should you wanted the table to reside in a database.

Which means you either have to by hand produce the mapping, or write some script to output this mapping file.

You could utilize PHP to redirect old Web addresses to brand new ones.

header("Location: /new.html",TRUE,301);

You still have to redirect demands for this PHP script, but you might find this more flexible and simpler to debug than solely using mod_rewrite.