1
votes

Firstly, On development time (yarn dev), there is no routing issue. After app is deployed (npm build, export and deploy) to firebase, reload page or trying directly open page, caused response 404 not found page although it's existing. Suppose that open home page and after that visiting another pages using next/link or next/router (Router.push('/page1')), no problem. For example;

www.firebaseapp.web.app/ -> /page1 -> /page2 // rendering page
www.firebaseapp.web.app/page2 // 404 not found
www.firebaseapp.web.app/page2.html // rendering page. i noticed later.

So, why nextapp do not response currectly or redirect /page1 to /page1.html when user try accessing directly page?

1

1 Answers

0
votes

Checkout the rewrites https://firebase.google.com/docs/hosting/full-config#rewrites

The firebase proxy might need additional configuration - next may not even be receiving the request