php - 分页重写规则将原始 url 添加到末尾
问题描述
我正在重写我的分页 URL,如下所示:
add_rewrite_rule(
'([^/]+)/seite-([0-9])',
'index.php?taxonomy=rubrik&term=$matches[1]&post_type=beitrag&paged=$matches[2]',
'top'
);
这很好用,我可以使用新 URL 访问分页档案。但是,它还会将原始 URL 添加到末尾,所以我最终得到了这样的 URL:
https://site.url/taxonomy/seite-3/page/3
但是,我希望它只是:
https://site.url/taxonomy/seite-3
我在这里想念什么?