Adding a real router.

No more RewriteEngine, it's all handled through ErrorDocument.
The .htaccess file will need to be altered if site is in a subdirectory.
This is a huge upgrade, you'll need to update your applications.