Unfortunately, just a custom URL provider is not enough. You would also need to implement a custom content finder and that is where the actual trouble starts, because now you need to traverse a significant portion of your content tree to check if your URL points to some content inside some other content.