Page MenuHomePhabricator

If url has a title, then users should see the clean urls (not the script path)
Closed, DuplicatePublic

Description

When clicking on links in MediaWiki, some links will have a title in the query, but the url will use the script path rather than the clean urls.

Examples:

If a link does not have a title it should continue to use the script path.

Event Timeline

I will note that this is intentional behavior (although personally I never understood why, and I agree that your proposed URLs would be nicer).

For example, the canonical URL for the history of the page "Saturn" on English Wikipedia is https://en.wikipedia.org/w/index.php?title=Saturn&action=history and not https://en.wikipedia.org/wiki/Saturn?action=history. (You can verify this by looking at the <link rel="canonical" …> in the HTML of both pages).

Some of our (Wikimedia's) configuration depends on this – for example, the first of those URLs is cached in Varnish for anonymous viewers (check the page headers for x-cache-status: hit-local), and the second one is not (x-cache-status: pass), so this would not be a trivial change.

This has been proposed before, and has been accepted. See T208328: If url has a title, then users should see the clean urls (not the script path).

There is currently, to my knowledge, only one product that has utilised this approve url structure, which is VisualEditor, and its ?veaction=edit urls.

The linked RFC T208328, was approved. Unfortunately, it was approved without a commitment or resourcing to convert existing use cases. However, the technical barriers have been thought through and resolved. Hence, if and when a product owner approves this direction and offers resourcing, it may be implemented without further TechCom involvement.

For further discussion or new parent tasks, refer to T208328.