If anyone wants permanent redirection from one page /a
to another page /b
We can use redirect:
option added in the router.js
. For example if we want to redirect the users always to a separate page when he types the root or base url /
:
const router = new Router({
mode: "history",
base: process.env.BASE_URL,
routes: [
{
path: "/",
redirect: "/someOtherPage",
name: "home",
component: Home,
// () =>
// import(/* webpackChunkName: "home" */ "./views/pageView/home.vue"),
},
]