I'm planning to migrate the content from my existing legacy system to drupal. In process there are a lot of static pages, nodes and taxonomy terms which have hyperlink references to the legacy URLs that cannot be replaced with current URLs due to their sheer magnitude and for which redirects cannot be set manually (i'm using path_redirect module to handle redirects, atleast I intend to).
So my idea of implementing this by redirecting my legacy URLs in my .htaccess to handle them in a custom module where the drupal URL is deduced based on the URL and its params and redirect them. Also add an entry for them with HTTP 301 in
path_redirect table so that next request I could check for the entry before proceeding to programmatically determine the node/page URL again. I skimmed the module code which seemed to use
hook_init to work the redirections and it seemed feasible in theory, though i'm not sure of the results in practice.
Hence I wish to know if this idea is sensible or if it has some flaws as I'm not an expert in the areas of URL rewriting or SEO. Also I'd request anyone with practical experience on the same to know of any challenges involved in this.This served as a reference before I decided to post my query.