Redirect inserting unexpected slash between index and parameters

Open
#300 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

@sean0407 is already working on this.

Since Oct 21, 2026.

  • #603 by @sean0407 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
backend

Research direction

Start by reproducing the redirect with the shown redirects and trailingSlash configuration, then trace the redirect handling entry point to identify where the slash is inserted. Done means a destination of /index.html?u=:1 redirects without the unexpected slash while the existing configuration behavior remains intact.

Written by the indexing model from the issue text.

Description

The URL

https://example.com/Ryan

is redirecting to

https://example.com/index.html/?u=Ryan
                              ^
      unexpected trailing slash

My configurations are as follows:

...
  {
    "redirects": [
      {
        "regex": "/(\\w+)",
        "destination": "/index.html?u=:1",
        "type": 301
      }
    ],
    "trailingSlash": false
  }

I don't expect that slash in the redirected URL since it is not in my destination. Is my understanding wrong? How can I remove the unexpected slash?

Dominant language
TypeScript
Stars
1.1k
Forks
90
Avg merge
3d 19h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/superstatic

All issues in firebase/superstatic

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.