I have a custom post type with the slug like this: https://mysitename.org/change-wire/post-name-here. Now the CPT has the slug like this: https://mysitename.org/changewire/post-name-here.
Basically, the slug is changed from change-wire to changewire. I would like to automatically redirect any old change-wire. I think a possible solution is to use the RedirectMatch rule but, but I am not sure if this is right:
I can only do it for one post, but I need to it for all posts
This will work for one:
Redirect 301 https://mysitename.org/change-wire/post-name-here https://mysitename.org/changewire/post-name-here
How to make this work for all posts with change-wire/{post-name} to change changewire/{post-name} ???
RedirectMatch 301 ???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…