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

Base path without a trailing slash #5349

Closed
1 task
Adrianjs42 opened this issue Nov 10, 2022 · 2 comments
Closed
1 task

Base path without a trailing slash #5349

Adrianjs42 opened this issue Nov 10, 2022 · 2 comments
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@Adrianjs42
Copy link

What version of astro are you using?

1.6.5

Are you using an SSR adapter? If so, which one?

node

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

I'm trying to implement a search page that has a base path on /search.
The idea is that the page is accessible on the base /search and a query string can be read.
e.g.
http://localhost:3000/search?q=test

The problem is that I always have a trailing slash, like the following example:
http://localhost:3000/search/?q=test

Without entering the trailing slash I can't find the page and I get a 404 error.

I already add in the config the trailingSlash: 'never' option but it is ignored.

Maybe related #5288

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-tnktw6

Participation

  • I am willing to submit a pull request for this issue.
@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Nov 10, 2022
@matthewp matthewp self-assigned this Nov 10, 2022
@matthewp
Copy link
Contributor

Fixed by #5358

@Adrianjs42
Copy link
Author

Fixed by #5358

thx @matthewp for looking into the bug.
I just checked the example given and still a trailing slash is always added to the url

As it looks right now:
http://localhost:3000/search/?q=test

What it should look like
http://localhost:3000/search?q=test

or am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

No branches or pull requests

2 participants