Y
Y
Yuri Maslennikov2019-10-18 14:19:59
WordPress
Yuri Maslennikov, 2019-10-18 14:19:59

Fix misconfigured 301 redirect in Wordpress?

The previous owners of the site incorrectly redid all the links in the posts on the site, and since there are more than 2000 entries, it is now impossible to correctly configure a 301 redirect to a new URL.
Initially, the pages looked like: site address/12345
where "12345" is the ID of the WORDPRESS post,
now the pages look like site address/kak-ustanovit-yandex-metrilu-na-wordpress/ (i.e. they became CNC)
Accordingly, all links on pages of other sites and internal links with the old address now lead to 404.
What rule should I write in .htaccess based on the fact that the previous page address is the post ID?
Unfortunately, I did not find any plugins or standard solutions.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Maslennikov, 2019-10-21
@NMC_COP

For anyone interested here is the solution:
Obtained using a program from the developers of yoast, written in 2010))) https://yoast.com/research/permalink-helper.php
Enter your parameters - you get the optimal redirect line for the .htaccess file

V
Viktor Taran, 2019-10-18
@shambler81

everyone just make 2000 redirects.
all the more so, as I understand it, the IDs have not been preserved or have changed, and VP itself does not know about the old addressing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question