why is 404 not showing for subfolders that don't exist on iis server

tre52 0 Reputation points
2024-07-11T14:51:58.47+00:00

For example, I have a webpage https://abc.com/test.html that comes up correctly. However, if I type

https://abc.com/test.html/test.html which doesn't exist it brings up the same page except it has no stylesheets applied. I would have thought it would return a 404 error. Is that not correct?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,595 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 51,256 Reputation points
    2024-07-11T15:45:37.3933333+00:00

    Really depends on what type of app you have. If you're using something like MVC then it would fail. However if it is just a regular web app then no it wouldn't fail probably. The web server matches the URL to the app that will handle it (generally the first part of the path) and then forwards to the app to handle the request. Everything after that is managed by the app itself. For a regular web site, the next URL is a file so it matches the file on disk and it is done. The remaining path and query string would effectively be ignored for routing but the URL itself would contain the information (if the page was using client scripting to see it).

    0 comments No comments