How to group pages in folders without modifying the page slug? Next.js

Viewed 17

I have my pages folder, but I want to group my auth pages, like so:

  • pages
    • auth
      • Login.jsx
      • SignUp.jsx

But with this approach I see that for entering the Login page I need to go to /auth/Login and to navigate to the SignUp page I need to go to /auth/SignUp.

Is there any chance to use this folder approach to group different pages but accesing them with slugs like /login and /sign-up?

Thanks in advance.

0 Answers
Related