【发布时间】:2017-04-06 22:50:27
【问题描述】:
我想将一个参数为 301 的特定 URL 重定向到另一个具有新参数的特定 URL。
https://www.example.com/index.php?id=329
到
https://www.example.com/index.php?eID=dd_googlesitemap
我尝试了一些东西,但我认为有几个错误。
location = /index.php?id=329 {
rewrite ^ https://www.example.com/index.php?eID=dd_googlesitemap permanent;
}
或
location = /index.php {
if ($arg_id = "329") {
rewrite ^ https://www.example.com/index.php?eID=dd_googlesitemap permanent;
}
}
或
location = /index.php {
if ($args ~ "id=329") {
rewrite ^ https://www.example.com/index.php?eID=dd_googlesitemap permanent;
}
}
谁能帮忙?
谢谢!
【问题讨论】:
标签: php nginx parameters url-rewriting typo3