You can also do this without a Rewrite Filter using a custom 404 page. In this case, you can use Server.Transfer or Server.Execute to redirect to the correct page. The problem is that you lose your QueryString object by doing it this way, but it seems to work with a little love and hugging.
If you want to avoid Server.Transfer and others, you can also wrap all your templates in objects and include them all, and just call the rendering function on the template you want to display, leads to a large code above your head, but it is easily overcome with using modern brute force server power!
source share