'NextJS Reloading Issue in IIS Production Server

I am working on a nextJS project which is hosted in iis web server. My problem is, when I reload from any direction except home "/" I am getting an error "Page not found". Can anyone help me with some suggestions and solutions please.

When I deploy to the server then if I reload it comes with error. I want to fix it but can't.



Sources

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

Source: Stack Overflow

Solution Source