This lesson is for members. Join us?
Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!
Redirect With Vue Router Without Changing the URL
The Composition API Masterclass is coming soon!
Sign-up for the Vue.js Masterclass 2024 Edition.
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.