ingress-nginx: Rewrite rules do not redirect if missing trailing slash

Right now it seems that when you have a redirect rule. See below for Ingress config. When I access example.com/something/ everything works as expected - however, when I access example.com/something there is no redirect to example.com/something/ therefore the page doesn’t work properly.

I can use a workaround in this past issue (now closed) here: https://github.com/kubernetes/ingress-nginx/issues/646

I think there should be an easier way to enable this behaviour (without a config snippet) or it should be enabled by default (probably an annotation of some kind)

https://github.com/kubernetes/ingress-nginx/issues/646

I am using 1.18.20 but it doesn’t require a particular version

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 21 (14 by maintainers)

Most upvoted comments

Sorry for late response. I hope to test this in more detail this week. Thanks 😃

On Wed, 16 Mar 2022 at 4:37 pm, Vyom Yadav @.***> wrote:

When are you planning to fix this, this issue is legitimate, I am facing the same problem, if any more details are required, let me know.

— Reply to this email directly, view it on GitHub https://github.com/kubernetes/ingress-nginx/issues/8047#issuecomment-1068751694, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR5JZWIPZUGU5Z2LCPE5VLVAFXQ7ANCNFSM5KFDHMJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

@k8s-triage-robot: Closing this issue, marking it as “Not Planned”.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.