I am looking at this filter to achieve something similar:
Returns the HTML of the sample permalink slug editor.
It seems effective. It's available as far as I can tell from WordPress 2.9.0 up.
add_filter('get_sample_permalink_html', 'my_sample_permalink_html', 10, 5)...
You can achieve that using a plugin like "Custom Permalinks"
The steps will be:
1- install and activate the plugin.
2- Save all your posts current permalinks into the custom meta field "custom_permalink" that meta field is the field that is used by the plugin to save the custom permalinks for each post and uses it as the permalink ...
I believe this issue is fixed in more recent WP versions and not sure which it was fixed in. But in older versions of WP the rule name="RULENAME" was always the same. The name must be unique or the IIS mod goes nuts.
You would also run into this if you are copying a complete site for backup or dev.
I believe the core issue here is that tags aren't organized by categories. As far as Wordpress is concerned, tags and categories don't have a direct relationship with each other. They are simply different ways of organizing posts, where the key difference is that categories are hierarchical (there are parent categories and subcategories) and tags are not.
In case somebody stumbles upon this in the future and finds any relevance to their issue.
My situation was unique in that the site itself was hosted by wordpress as a managed service. I had no access to most of the source files for the wordpress framework itself (the managed service provider managed most of the core files, only the wp-content folder and ...
https://wordpress.stackexchange.com/ is the stackexchange website that deals with wordpress.
It seems like your website is hosted by Automattic so you can get their help by communicating with their support staff. Go to https://wordpress.com/support/contact/ and click on "I need customer service for a paid site hosted at wordpress.com"
I would stick to make the url https://example.com/life/life-article/?special=1
I would create a php function that:
retrives all posts and stores them in a variable;
make a loop to loop all the posts and check if they are "life" posts;
inside the same loop, if they are "life" posts, change their slug to ...whatever/?special=1;
and then ...
to achieve that is not easy, this to say almost impossible, the permalinks are made by the slugs, and the slugs have a function called sanitize_tittle(), this is probably what is doing that to your permalink.
A slug consists of solely lowercase alphanumeric characters, dashes
and underscores, without 2 or more dashes in a row (sequences of
underscores are ...