Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single page rewrite should ignore query string #194

Closed
msssk opened this issue Apr 17, 2024 · 5 comments · Fixed by #224
Closed

Single page rewrite should ignore query string #194

msssk opened this issue Apr 17, 2024 · 5 comments · Fixed by #224
Assignees
Labels
bug Something isn't working

Comments

@msssk
Copy link

msssk commented Apr 17, 2024

Description/Steps to reproduce

  • Enable "Single page rewrite"
  • expect request for existing file /path/file.html to load the requested file
    • ✔ works as expected, file.html is loaded
  • expect request for existing file /path/file.html?key=val to load the requested file
    • ❌ does not work, index.html is loaded

Version information
Windows
What version of the program are you using?
1.2.10

@msssk msssk added the bug Something isn't working label Apr 17, 2024
@ethanaobrien
Copy link
Collaborator

Interesting how the regex catches this. Technically related to #88 which allows changing the matching regex based on your needs

@terreng
Copy link
Owner

terreng commented Apr 17, 2024

I'm not sure if we've implemented this the right way. Right now if you try to access a "valid file path" like /asdf.html, it'll return a 404. I think this should instead return index.html. I think it should always return index.html unless the path is a valid file. Thus it should be impossible to see a 404.

@ethanaobrien Does that make sense / seem right? If so we wouldn't need regex at all... We could use the javascript URL constructor get just the pathname part of the url and ignore the query string. Could you implement this?

@ethanaobrien
Copy link
Collaborator

That would work, yes

@terreng
Copy link
Owner

terreng commented Apr 17, 2024

We could close #88 then too.

@terreng
Copy link
Owner

terreng commented Oct 26, 2024

Will be fixed soon in 1.2.14. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants