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

Wildcard redirects #1748

Closed
1 task done
manniL opened this issue Sep 21, 2023 · 1 comment · Fixed by #1976
Closed
1 task done

Wildcard redirects #1748

manniL opened this issue Sep 21, 2023 · 1 comment · Fixed by #1976
Labels
enhancement New feature or request

Comments

@manniL
Copy link
Member

manniL commented Sep 21, 2023

Describe the feature

If the target URL ends with /**, treat it as wildcard redirect and append the subpath properly.

  routeRules: {
    '/single/': { redirect: { to: '/single-2/', statusCode: 301 } }, // Works 
    '/wildcard/**': { redirect: { to: '/single/', statusCode: 301 } }, // Works
    '/wildcard/**': { redirect: { to: '/wildcard-2/**', statusCode: 301 } }, // Does not work but would be nice
  },

wildcard/a -> wildcard-2/a

Additional information

  • Would you be willing to help implement this feature?
@pi0 pi0 added enhancement New feature or request and removed pending triage labels Sep 21, 2023
Copy link
Member

Atinux commented Sep 21, 2023

What a timing! I was going to create the same issue 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants