We need to do hundreds of 301 redirects on a site which is undergoing a massive URL restructuring. Whats the best way of doing this? at .htaccess level? at code level?, apache level? Will there be a noticeable slowdown on the site if the .htaccess becomes bloated?
Thanks
mod_rewrite can use database backends using the RewriteMap directive, which probably means it can scale pretty well to a big number of redirects.
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#RewriteMap
There's even a way to plug in a program to calculate redirects programatically if you want, although if you can do that, it might fit better if you do it in code.
As always, I suggest you set up a test environment and benchmark a little.