↑ Return to L30 URL and Slug

PRIV C31f URL Redirect

Responsible
r.karadjov
My articles
Follow on:

Page no: C31f
Explanation

Video and pics

Redirect Posts on SNBCHF, Pages on IT.SNBCHF

: Redirect works for posts on snbchf, Redirect does not work for pages on it.snbchf

https://doc.e-llusion.org/feed-site/test-syndication-tools/

does not redirected to new URL
https://doc.e-llusion.org/mediacorrections/test-syndication-tools/

But it works on snbchf when I change URL. It works with posts.

This is a very important functionality. Old URL are automatically redirected. I need doc on the plugin why it worked.
For example the version. It must be a new version.

We might change the URL of all ecoblogs and we need.

 

 

Core WordPress Redirect

Core WP Redirect for Posts

Works for Posts with Core WP Functionality

i disabled all of the plugins and start testing the core WordPress functionality for redirecting post.

First we start with a post. Edit a post and a simple url. Then open the post. The post page is visible.

Then edit the post’s URL and change it to something completely different. Refresh the second tab and wait if it is redirected. And it works fine.

DB: Redirect Information via Versioning

Where does Core WP Store the Redirect Information?

Answer: Versioning of the posts.

The Core WP works the same way as we want to work (really ??)

They’re using the different (old) versions of the posts to keep their URLs. If they change a URL of the post, they store it as a version of the post.

Search for post:

They search the DB for matches of the permalink,

  • if yes (latest version)  -> open the page (or post?),
  • if it is only an old version -> open the right page (or post?)

Question: Do they build a 301 redirect on the fly?

 

wp problem for old slug

Core WP Redirect for Pages

Does not work for Pages with Core WP Functionality

Doing the same test with a page. First add a new test page. Open it in another browser tab and wait.

Change the URL and save the page. Then refresh the second tab.

Questions:
Is there no versioning for pages?

 And this is the result screen.

Result: Core WP functionality does not work with pages.

Questions: Why pages do not use the versioning?

Background: Pages also have versioning. So the redirect should work.

Answer: It is a WP Core team decision. I don’t know why they do not implement this.

 

 

Our Stop Words algorithm

Redirect after URL Change

Test if we need to redirect when we change post URL on our blogs? 

Do we really need that, or does core WP do the job for us?

Answer: no versioning

We do not store different versions on every change of URL for syndication tools/Stop Words.

Hence we must implement the redirect on our owns.

 

post meta table overview

Our plugin algo

Our plugin is using wp_postmeta table to store different urls of the post. When we execute syndication tools, we will create a new postmeta row with the new URL.

We will check and delete if the rows are more than 10 for every post. Then we will have no more than 10 rows per post in DB which is fine.

We will check this when we finish the execution process and delete the oldest ones.

Our plugin db problem

Which tool does the redirect and how

On SNBCHF we have a redirect.
I want to know which tool/plugin it does and which tables it uses.

Reason:
No interferences between this plugin and our redirects. Maybe you can use the same DB tables.

Page Redirect Algo

 

Different tools for URL redirects

Permalink Finder  (never H4 with redirect)

Permalink finder is an old plugin, buy it works perfectly without any bugs or problems until now. It will work very well on all our blogs and we can change our permalinks without any problems. The plugin will monitoring and make Redirect 301 from the old urls to the new one.

Quick Page/Post Redirect Plugin

This quick page redirect plugin has two redirect functionalities – “Quick Redirects” and “Individual Redirects”:
QUICK REDIRECTS (301 Redirects)

I also tried with turned on permalink finder the same test. The issue is that permalink finder is too old plugin and does not have PHP7 support. So we needed to rewrite it, before use it. It probably will work. I did not do that.

Result screen is a white page with some errors in background for php syntaxis errors.