Vue.js 3 Options API Masterclass
Plans from $25/month

This lesson is for members. Join us?

Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.

Redirect With Vue Router Without Changing the URL

🚧 PLEASE NOTE: This masterclass is built with the Options API
vuejs-masterclass

The Composition API Masterclass is coming soon!

In this lesson, we'll learn to use the Vue router's Route Guards (middleware) to check if a resource exists before entering the route.

If the resource doesn't exist, we'll redirect the user to our 404 page, while still keeping the exact same URL.