Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Next.js 404 on refresh

I have Next.js page like page.js so it can be reach through http://localhost:3000/page. But for some reason I would like to get this page through an another url http://localhost:3000/my-page

So I used Link component like this way

<link href="/page" as="my-page">
    <a>
        My link to page
    </a>
</link>

Problem is that if I refresh browser, I get a 404 error page if I do not use as property it works.

How can I prevent this behavior ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is because you're using a SPA, in this cases the router is different because the routes are loaded with the principal component

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!