Change permalink structure with post id

I have a blog news from 1 year with around 1500 articles indexed on Google with this permalink structure (I know it is bad…):

/%category%/%postname% (without slash!)

Now I would like to change permalink structure without loosing SEO to:

/%post_id%_%postname%/ (or maybe is better this one -> /%postname%/%post_id%/)

I wrote this rule for the .htaccess but I am not sure it work well:

RewriteRule ^/([^/]+)/([^/]+)$ ^/(d+)_([^/]+)/$ [R=301,L]

Thanks for your help!

Read more here:: Change permalink structure with post id

Leave a Reply

Your email address will not be published. Required fields are marked *