Page MenuHomePhabricator

Strip rdfrom parameter in canonical urls
Closed, DuplicatePublic

Description

When following an interwiki redirect (e.g. https://wikimediafoundation.org/wiki/User:Krinkle), the target page has a query parameter rdfrom.

This is included (just like any other query parameter is by default) in the canonical url:

<link rel="canonical" href="http://meta.wikimedia.org/wiki/User:Timo_Tijhof_(WMF)?rdfrom=%2F%2Fwikimediafoundation.org%2Fw%2Findex.php%3Ftitle%3DUser%3AKrinkle%26redirect%3Dno" />

For normal redirect, we strip them.

E.g. https://en.wikipedia.org/wiki/Catwalk displays "Runway (fashion)" with a "(Redirected from Catwalk)" message, but outputs:

<link rel="canonical" href="http://en.wikipedia.org/wiki/Runway_(fashion)" />

Removing any trace of the redirect.

Event Timeline

Krinkle created this task.Dec 18 2014, 7:22 AM
Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle changed Security from none to None.
Krinkle added a subscriber: Krinkle.

Hm... our handling is rather inconsistent. If the redirect had any query parameters, those end up stripped as well:

https://en.wikipedia.org/wiki/Runway_(fashion)?foo=b

<link rel="canonical" href="http://en.wikipedia.org/wiki/Runway_(fashion)?foo=b" />

https://en.wikipedia.org/wiki/Catwalk?foo

<link rel="canonical" href="http://en.wikipedia.org/wiki/Runway_(fashion)" />
Aklapper triaged this task as Low priority.Dec 19 2014, 3:37 PM