0

On my permalinks settings page I have the following permalink structure defined: "/%year%/%monthnum%/%day%/%postname%/". This works fine for most posts. But I want to have a custom permalink structure for a single category. I've based my solution off of this one:

Change permalinks structure for specific category

Now both permalinks work and I wan't the old permalink defined by the permalinks structure on the permalinks page to redirect to the new one defined by generate_rewrite_rules. For example I want the old permalink:

http://example.com/2018/05/18/post-name/

To redirect to:

http://example.com/products/post-name/

I've tried to flush the rewrite rules but both permalinks still work.

Is there a function I can use to tell wordpress to redirect the old permalink to this new one?

  • Sometimes browsers cache redirects, try in another browser or a private browser window. – Fayaz Jun 15 '18 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.