0
votes

My sites old permalink structure was example.com/%postname%

Now, I changed my all posts permalink to new structure example.com/people/%postname%

Problem is that old permalinks not redirecting to the new structure. I tried "redirection" plugin but it does not work.

Is there any plugin or htaccess code to solve this issue?

1

1 Answers

1
votes

Yoast provides a free tool which will allow you to generate the code for the .htaccess file, you can find it here and the associated blog post

This should do what you are asking

RedirectMatch 301 ^/([^/]+)/$ http://www.example.com/$1