A
A
Alexey selftrips.ru2018-04-17 05:31:01
WordPress
Alexey selftrips.ru, 2018-04-17 05:31:01

"URL logging" plugin?

If the entry's URL changes, it becomes unavailable at the old URL (generally).
But the entry has an immutable "entity" of its ID. Is there a solution (plugin) that keeps a history of all URLs, and which, if the URL is not found, looks at whether such a URL was once in some record, if it finds, sets a redirect to a new URL.
Is it possible to do it yourself somehow?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Vorotnev, 2018-04-17
@HeadOnFire

First, it's not entirely true that when you change the URL, the entry becomes inaccessible. WP has a built-in old_slug_redirect mechanism that remembers and tries to find old slugs and redirect. But the mechanism is quite simple and does not cover all cases (for example, if the URL structure contains a variable part like dates or a hierarchical post type).
Second, the solution could be a plugin https://wordpress.org/plugins/redirection/

A
Alexey selftrips.ru, 2018-04-17
@selftrips

1. built-in old_slug_redirect mechanism, sometimes it works, for example, when there is an ID in the URL.
2. It seems to me that I wrote a very simple mechanism for "remembering". It will not work only when the id itself changes. But this only happens when deleting and creating a new record with copying (these are a new record !!) or even if you go into the database and edit the ID there, which is not required for 99.99% of users and they don’t even know about it.
3. The plugin https://wordpress.org/plugins/redirection/ does not allow you to do this automatically!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question