IIS web site with httpplatformhandler on specific route does not redirect to the nextjs site

75 views Asked by At

I am trying to host a nextjs website on iis here is my set up .

  1. Website with web.config hosted under default site

enter image description here

  1. Contents of web.config which causes nextjs site . On access of http://localhost/AppWithNode1/SimpleErrorView it should redirect to the nextjs site. enter image description here

  2. On navigate to the http://localhost/AppWithNode1/SimpleErrorView it shows the nextjs 404 error page

enter image description here

the console shows 404 for the js and css assets too.

  1. I have tried with adding a basepath to the nextjs.config.mjs and a assetPrefix still get the same error . Im not sure what else is missing to get this to work ? .Any help would be appreciated Thanks . enter image description here

Edit:

enter image description here

Output after rewrite enter image description here

Output from the port hosted via httpplatformhandler

enter image description here

Log file generate output enter image description here

0

There are 0 answers