live-server icon indicating copy to clipboard operation
live-server copied to clipboard

Query strings lost for directories with index.html

Open osdiab opened this issue 5 years ago • 2 comments

Issue description

I try to go to a path that is a directory with an index.html file within it, with a query string hosted with live-server. For instance:

I try to go to 127.0.0.1:8080/invite?t=abcd, with the file invite/index.html present.

I expect it to redirect to 127.0.0.1:8080/invite/?t=abcd

...but instead it redirects to 127.0.0.1:8080/invite/

The query string is lost, which is not what I expected; I'm using live-server to test out what would happen on Github Pages before I deploy it, but this is one area where the behaviors diverge.

Is this intended?

Software details

  • Command line used for launching live-server: iTerm, zsh
  • OS: Mac OSX
  • Browser (if browser related): Firefox
  • Node.js version: v10.3.0
  • live-server version: 1.2.0

osdiab avatar Sep 07 '18 10:09 osdiab

This problem still exists. any updates?

snrbrnjna avatar Jan 25 '22 19:01 snrbrnjna

OK, for documentation purposes: you can use the --open option of live-server for passing query params to the opened page.

snrbrnjna avatar Mar 08 '22 23:03 snrbrnjna