You could probably use Handlers . If the URLs are distinct enough, you could write a pretty broad entry in to urlMappings section of your web. Config and then use the handler to re-route the traffic.
I'd use the catch all route and before returning that 404 I'd insert the logic to check if it needs a 301 instead.