Rewrite rules applied differently after upgrade

I recognize that rule. It’s the unusual rule I wrote to deal with the permalink uncertainty issue. 🙂

First, you’ll only get that weird rule if you have your custom permalinks set to start with a non-numeric value. Like, if you have your custom permalink string as just %postname% instead of something like %year%/%postname%.

Next, the special-case rule you’re finding isn’t added to the top of the list. So if you have your rule being added, then your rule is more specific, and you should be adding it to the top of the rewrite stack so that it gets checked first. You can set the third parameter to add_rewrite_rule to ‘top’ to do that.

That should solve the issue, really. If it doesn’t, well, you’ll have to post code so people can see what the problem is.