My hosting plan includes 1 site. I have installed a Asp.Net MVC Core 2 project on that site and it is working as designed. Now I would like install a blog on the same site in a subdirectory. The blog I am using is Wordpress. Wordpress is installed to a subdirectory on the Asp.Net MVC Core 2 site. When I run the Wordpress blog I get a .NET error page with the error:
Status Code: 404; Not Found
if the Asp.Net MVC Core 2 site runs at www.example.com, i want the blog site to run at www.example.com/blog
I assume Asp.Net MVC Core 2 is looking for a BlogController when I go the blog directory. Is there a setting in IIS7 or Asp.Net MVC Core 2 (Startup.cs or other config file) that tells it to leave the blog directory alone and not use .NET?
Note: i read MVC3 web site with Wordpress in subdirectory, but it is for MVC3 not Asp Net MVC core 2
IgnoreRoute()method which is not available for Code. It is better to do the redirection in IIS instead, but most shared hosting providers limit what you can do with IIS, so see my answer for an alternative approach./Blogfolder from ASP in IIS. If they cannot help, you will have to ignore the route using the middleware. See howUseStaticFiles()does it for static files and try to mimic the code.