views:

137

answers:

2

I have a migration project from a legacy system to a new system. The move to the new system will create new unique id's for the objects being migrated; however, my users and search indexes will have the URLs with the old ids. I would like to set up an apache redirect or rewrite to handle this but am concerned about performance with that large number of objects (I expect to have approximatelty 500K old id to new id mappings).

Has anyone implemented this on this scale? Or knows if apache can stand to this big a redirect mapping?

+1  A: 

Can you phrase the rewrites using a smaller number of rules? Is there a pattern which links the old URLs to the new ones?

If not, I'd be concerned about Apache with 500K+ rewrite mappings, that's just way past its comfort zone. Still, it might surprise you.

It sounds to me like you need to write a database-backed application just to handle the redirects, with the mapping itself stored in the database. That would scale much better.

skaffman
A: 

If you have a fixed set of mappings, you should give a mod_rewrite rewrite map of the type Hash File a try.

Gumbo