Debug server never 404's
I've got a strange issue with the Webstorm development server: it doesn't seem to ever 404 within my project. If I hit localhost:63342/project-root/notarealfile.html, it gives the same responses as localhost:63342/project-root/index.html, rather than a 404 response.
I've tried this on both WebStorm 2017.1.4, and on the 2017.2 EAP, with the same result. A colleague on 2016.3.3 tried the same, and for him it does 404.
Is this a setting I've missed, or an issue with the server?
Please sign in to leave a comment.
There are no such settings. Is the issue specific to certain project? Please create a new empty project, add .html file, try opening non-existing page using localhost:63342/new-project-root/non-existing.html - does the issue persist?
It seems to be project specific. Any ideas what would cause this to happen?
Edit: Ok, so it happens in several of our projects, but not the blank one I just created.
Please make sure to close all projects, restart WebStorm, then re-open the project you have the issue with (don't open other projects) - does the problem persist?
It does, yes.
I'm on Windows 10, I take it that closing the IDE will be enough, and it doesn't leave anything running in the background I need to close via task manager?
Not, it's not about anything running in background. I asked to close everything to make sure that you don't have projects that share the same name opened during a session - this may cause unpredictable results (serving files from one project instead of the other)
Looks like the issue is specific to your code/configuration. Can you provide a project I can use to recreate the issue plus your idea.log (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files)?
While trying to get a minimal project with the issue present, I think I've found the problem:
Create an empty new project, add an index.html file, run it, and change the address to a file that doesn't exist, and the page will 404. Add a new file to the project in the root, called config.json (can be totally empty), refresh the 404'd page, and you now get the index file.
Ah, I see:) This is the expected behavior - please see https://youtrack.jetbrains.com/issue/WEB-24283#comment=27-1758706