1

I thought I wanted something fairly simple. Catching all the url's containing /s/, and rewrite them. But for some reason my query vars do not contain the first match. Making it match multiple tags would be my next step... but can't get even this to work? Looking to long into this, need some help.

https://regex101.com/r/sNfHex/1

<?php
// Should match /category/s/
// Should match /category/tag/s/
// Should match /category/tag/tag/s/
// Etcetera

add_rewrite_rule("^(.*)\/[s]\/?", "index.php?category_name=$matches[1]", 'top');

4

0 回答 0