http-party / http-server

a simple zero-configuration command-line http server
MIT License
13.64k stars 1.5k forks source link

Trailing slash when serving directory index.html #539

Open luaVolk opened 5 years ago

luaVolk commented 5 years ago

As the title says when the server adds a slash at the end when serving an index.html file from a directory besides the root.

I don't see an option to remove them and its a bit of a problem for me right now, as I'm using this as a development server and the target server does not have trailing slashes.

Macyrate commented 4 years ago

I just have the same problem.

thornjad commented 4 years ago

I think you may be looking for the option -i false (autoIndex). Does using that option do what you'd like to happen?

damianobarbati commented 4 years ago

@thornjad unfortunately not. I get a trailing slash on my paths and this breaks the react SPA :\

simplenotezy commented 4 years ago

@damianobarbati have exact same issue, it prevents me from using http-server with my Vue/Nuxt app https://github.com/http-party/http-server/issues/656

thornjad commented 3 years ago

What exactly happens when you use -i false?

I'll also note that http-server is a static server and doesn't officially support SPA's, but I'm more than willing to help if I can

github-actions[bot] commented 2 years ago

This issue has been inactive for 180 days