Last modified: 2014-01-03 17:08:43 UTC
Very easy fix. If clean URLs are in use we should use things like this:
Currently we do things like this:
The first is much cleaner, and used by competing wiki software such as MoinMoin.
They work just the same, see the URL, which is demonstrating the first style of URLs.
Works like this just fine on Wikimedia sites:
Then what happens when someone uses path to query rewrites?
Then no-one is able to edit...
Something like this is already possible if someone configures it that way in $wgActionPaths.
Things like this should not be automatic, because there is a strong chance that new setups may be broken by it.
(The rewrite case mentioned in comment #1 would be due to misconfigured rewrite rules -- you should use the QSA option, otherwise you break various forms in the system as it is.)
While it would be possible to append various options direct to a plain view path, there are several arguments against it. Chief among them are my favorites:
First, the lack of a consistent prefix for non-view links means they can't be excluded cleanly from robots.txt; this can lead to excessive search spider traffic. (Meta tags will keep edit pages and such out of indexes, but the spider has to load the pages to reach the meta tags.)
Second, autocomplete algorithms in browser URL bars will sometimes pick up such URLs, and you find yourself acccidentally hitting enter for a different action than you intended. Personally I find that a bit annoying. :)
The first is functional and the second is merely aesthetic, but I consider them worthy. :) My own preference for prettier action URLs is to add additional prefixes with $wgActionPaths and either stub scripts or rewrite rules, eg /edit/Sandbox
(In reply to comment #2)
> First, the lack of a consistent prefix for non-view links means they can't be
> excluded cleanly from robots.txt;
This is no longer the case as search engines now support glob rules: https://www.mediawiki.org/wiki/Requests_for_comment/Clean_up_URLs#Migration
> Second, autocomplete algorithms in browser URL bars will sometimes pick up
> URLs, and you find yourself acccidentally hitting enter for a different
> than you intended. Personally I find that a bit annoying. :)
At least in Chrome, the same is actually true for the ugly /w/index.php?title=...&action=..., but in that case it is harder to get to the actual article URI by just deleting the query.