Questions tagged «rewrite-tag»

1
使用重写API构造RESTful URL
我正在尝试为RESTful API生成重写规则。我只想看看是否有比写出所有可能的重写组合更好的方法来完成这项工作。 好的,所以我有4个查询变量要在URL中说明 指示符 国家 响应 调查 基本网址为www.example.com/some-page/ 4个变量的顺序将保持一致,但某些查询变量是可选的。 所以我可以... /indicator/{indicator value}/country/{country value}/response/{response value}/survey/{survey value}/ 或...(否/ response /) /indicator/{indicator value}/country/{country value}/survey/{survey value}/ 要么... /indicator/{indicator value}/country/{country value}/ 是否有比过滤rewrite_rules_array和添加手动创建的重写规则数组更好的方法呢?将add_rewrite_endpoint()rewrite_endpoint或者add_rewrite_tag()是任何使用吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.