Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

The Vue.js 3 Masterclass

Get access to the most comprehensive Vue.js video library in the world. Over 300 video lessons including the newest Vue 3 features.

Redirect With Vue Router Without Changing the URL

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.