'How to exclude a particular folder from ASP.NET 6 on IIS and allow it to process by PHP handlers?

I can deploy an ASP.NET 6 web app to IIS on Windows 2019 Server. All is working.

The default web.config is generated and exist in the root:

<system.webServer>
<handlers>
  <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\TestWebApp.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>

Question

I would like to have a /blog folder and I would like deploy a PHP application there. How can I explain to IIS to not pass those request to the AspNetCoreModuleV2 handler, instead pass those requests to the PHP handler? (url rewrite module is already installed)



Solution 1:[1]

You can create a Virtual Application under your webapp site.

The official documentation has only one paragraph describing this Virtual Application. The answers in the following posts are very detailed and will help you.

Using ServerManager to create Application within Application

My Test Result for you

This test in the azure web app, it's same as IIS.

How to deploy a Flask+React application to Azure Web Service

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Jason