Next.js Discord

Discord Forum

Deploy to IIS Server using basepath in nextjs config

Unanswered
Savannah posted this in #help-forum
Open in Discord
SavannahOP
Hi, anyone can help how to make my IIS server can read basepath

In my local its working fine, but when I deploy it with setup next.config.js
BasePath: "/subdir"
Its always showing 404 not found


Example:
In local works good
Localhost/subdir

In server using build next 404 not found
Localhost/subdir
Domain/subdir


My expectation:
I want to deploy in iis -> Default Web Site -> sub-dir

Because I need to give aunthentication in Default Web Site to "anonymous disabled" and subdir "anonymous enable"

0 Replies