↑ Return to P30 Plugins for URL

PRIV P37 Archive URL Aid


Page no: P37

 

 

Business Requirements

We want to see our pages on the internet archive, as follows:

The main idea of the plugin is the following two functionalities:

  1. Some categories or pages have different URLs in past. This means that the archive.org should show the old URL.

Please read the background in the permalinks page.

Internet Archive

snbchf page on the internet archive

Design

The requirement 2 is very complicated to implement.
Since this case of changing URLs does not happen often, we use the manual problem, namely creating manual entries in the Quick Redirect Plugin.
This will fulfill the need that external links point to the right URL and the links are not broken.

As mentioned in the Permalinks article, internally in WordPress the URL change is not important. Still we need a problem for requirement 1, for the Archive URL plugin.

Appearance on the blog

With this functionality we modify the link URL used with the button “see on internet archive”. We are able to modify parts of the URL. Currently we only it for the archive.org. It is one icon inside the social icons plugin.

Social Icons

WP Backend UP

List table

Under tools -> Archived Cats we can see our redirecting tool.

The example shows that the URL for “global-macro” is replaced “markets-stocks-bonds”.

 

cat3add

Add a new mapping rule

Using “Add a new mapping rule” you can add as many rules as you want.

 

In Old category URL, one can add the old slug of the category.

In New category URL you have to add the new.

Date/Time is the validity date from when the rule is valid. To be changed into “new valid from”.
This should a be a date, not only a year.

New Category Mapping Rule

Delete function

Actions -> Delete –  one can delete the rules which we don’t need anymore.

Implementation

where is the code located, which template (Graphene or Graphene child), which file, which function?

Comparing dates

A general problem remains:
We would always send the old URL to the archive, because internet archive is used typically to prove the very-first authorship.

: If a page got saved with the new URL, it would not be visible.

Recently I asked to incorporate the change date. The logic is the following:

If the first publish date is available then this one would be a better choice, the importance is on “first”

We agreed that authors should change the publish date, when they do important changes. Therefore we do not use other dates, like latest Revision date, anymore.

 

Test cases

 

Test Case No1:  Add a new mapping rule for a category/parent rule and verify date

 

 

Step 1) Add the mapping rule for the category parent page

 

The following shows typical parent page rules

Test case 1, Typical parent page rules for the Permalink & Archive aid

Step 2) Verify that URL changes are generated for the HTACCESS file.

Testing catmap rule, CatMapping - Click to enlarge

Step 3) Verify that the URL is changed.
In the case of global macro the new URL should show  “markets-stocks-bonds”.
Step 4) Check on archive.org that the old URL is shown.

Archive.org page, Archive URL Aid rule, Test case 1

Archive.org page, CatMapping rule, Test case 1 - Click to enlarge

Test case No 2:  Test a complex URL with a page under parent and sub-parent —> Bug

 

The archive URL aid does not work yet with double “/” inside the URL.

It is able to do http://snbchf.com/richardkoo/deficit-manufacturing-secular-stagnation/

but not http://snbchf.com/economic-theory/richardkoo/trade-deficit-manufacturing-secular-stagnation/

 

 

 

Tags: , , ,

See more for P3x Plugins for URL