0
votes

I changed permalink from /%postname%-%post_id%/ to /%postname%/ only. But the problem is that I can't get any method to redirect 301 old permalink to new one.

I searched google and found this plugin which redirect the old permalink to new one. When I check the HTTP Response Header, it also shows the old page is being redirected to new one but actually in the content it shows 404 page. Here is the example page.

Even when I try to fetch the page in Google webmaster tools, the bot fails to fetch the old page.

Is there any way to fix the problem??

1

1 Answers

1
votes

Quickest way is just add some redirect into your .htaccess file, if you use Apache server. You can easily populate the url list for your legacy links by write some sql query.

.htaccess

# BEGIN FIX URL
Redirect /my-sample-post-100 /my-sample-post/
Redirect /my-2nd-sample-post-101 /my-2nd-sample-post/
...
etc
# END FIX URL