I am trying to redirect the url with status 404 and having specific query parameter to homepage.
example ,
en-us/product1/xyz.html?lang-switch=true
# if this url is 404 status
en-us/product1/index.html
#this should be the redirected url
Here is the redirect rule I have written
query parameter is lang-switch
[[redirects]]
from = "/:lang/:product/*"
to = "/:lang/:product/index.html"
status = 404
query = {lang-switch = ":lang-switch"}
This rule is still showing 404.
How to solve this use case?
Thank you