I want to redirect one specific URL with parameters as 301 to another specific URL with a new parameter.
https://www.example.com/index.php?id=329
to
https://www.example.com/index.php?eID=dd_googlesitemap
I tried something but I think there are several mistakes.
location = /index.php?id=329 {
rewrite ^ https://www.example.com/index.php?eID=dd_googlesitemap permanent;
}
OR
location = /index.php {
if ($arg_id = "329") {
rewrite ^ https://www.example.com/index.php?eID=dd_googlesitemap permanent;
}
}
OR
location = /index.php {
if ($args ~ "id=329") {
rewrite ^ https://www.example.com/index.php?eID=dd_googlesitemap permanent;
}
}
Can anyone help?
Thanks!