aws-amplify / aws-amplify/amplify-hosting

Not able to redirect if we have multiple path params

Open
#2,061 1 comment 1 reaction 0 assignees View on GitHub
question
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

We are building a next js application.

Now in our path we have multiple path parameter like in below we have categoryID and productID
For example we , we have a url like "/product/categoryId/productID"

So for this we have added a redirect like this

/product/<*>/<*> --> /product/[categoryID]/[productId].html

But this always redirecting us to home page.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported redirect in an Amplify Hosting deployment using a Next.js route with categoryID and productID path parameters. Check how the documented redirect pattern handles multiple wildcards and compare it with the provided /product/<*>/<*> to /product/[categoryID]/[productId].html rule; done means the request reaches the intended product route instead of the home page.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js
Domain
cloud, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.