Routing exists in 2 spots, on the server and on the client https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/app-route-map.js.es6 …
A rewrite on the server without doing the needed work on the client will result in stuff breaking
This is beyond your skill level and will cause problems.