When we first launched the Qvault single-page-app, we were using Vue Router’s default hash routing. Hash routing looks ugly to the end-user, and when you want to be able to share parts of your app via direct link those hashes can get really annoying. We have since moved to the newer HTML5 History Mode which doesn’t have that obnoxious hash in the route. We had a bit of trouble coming up with a clean way to redirect those old hash routes to the new ones, however, so now that we’ve solved it we will share our findings. At the time of writing we have the following routes, you probably have something similar: Our goal is to redirect all of our old hash based (#) routes to the new non-hash versions.

Related Articles