Home > Back-end >  Can nuxt 3 rewrite url with sub directory
Can nuxt 3 rewrite url with sub directory

Time:05-20

I have project structure like this

- pages
 - login.vue
 - index.vue
 auth
 - about.vue

by default, nuxt can access a path with 'localhost:3000/' and it will rendered by /pages/index.vue
in case if i want to access a page in dir auth/about it's must be access a path 'localhost:3000/auth/about'
but i want to access path with 'localhost:3000/about

CodePudding user response:

You can use a enter image description here

could be accessed via either /about or /auth/about.

  • Related