'Can you ignore predefined next.js route?

I currently have the pages folder /pages/phone-number/ that handles predefined url like /london and /all-numbers. If there is a url that is not listed it then it will redirect to /all-numbers.

Inside of other folder /pages/[...feature] I want to catch /phone-number/my route (as it's not related to any of the /pages/phone-number/ url (but confusingly has similar url) Code inside of the files in /[...feature] folder is being ignored as the predefined /pages/phone-number is taking precedence over the slug .

Is there a way for that specific url /phone-number/my to be catched inside of the [...features] folder rather than /phone-number folder?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source