Preserving URLs after CMS migration with redirect database and apache http?

Posted by stwissel on Server Fault See other posts from Server Fault or by stwissel
Published on 2012-11-16T02:35:56Z Indexed on 2012/11/16 5:02 UTC
Read the original article Hit count: 552

Filed under:
|
|
|

We will migrate an entire intranet from one CMS to another. All URLs will change in a non-predictable pattern, but I can capture a file with original,new URLs I can feed into anything. I have hundred thousands of URLs, not just a few hundred.

What I would like to do: every URL that is not found (404) should be checked against the database and if a new URL found a 301/308 issued instead. Some trickery to suggest similar pages in the 404 message if the lookup was unsuccessful would be an added bonus.

Is that the right approach or should I check redirection first all the time?

How would I do that in Apache2? Is that a custom 404 module?

© Server Fault or respective owner

Related posts about apache2

Related posts about redirect