DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Vue History Mode – Support Legacy Hash URLs

4 years ago qvault.io

Summary: This is a summary of an article originally published by the source. Read the full original article here →

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.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com