Next.js Discord

Discord Forum

Is there any way of having the @ symbol in a route?

Answered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
I'm using the app router, and am trying to have a page like /users/@/[id]/page.tsx so I can access users via eg /users/@/neilgd72. It just gives a 404 error though. If I change the @ to an X, for example, it works fine though. Any ideas?
Answered by Asian black bear
It’s a special character and shouldn’t be used. Technically it can be supported with escaping it but that is buggy and probably for the better.
View full answer

2 Replies

Asian black bear
It’s a special character and shouldn’t be used. Technically it can be supported with escaping it but that is buggy and probably for the better.
Answer