Make the wiki's main page available at a canonical URL that is consistent regardless of wiki's language or configuration.
This would mean that by default when installing MediaWiki at /w:
- Viewing https://wiki.example/w it will respond HTTP 200 OK, and render the Main Page.
- The link in the sidebar for the Main Page points at /w.
- <link rel=canonical> on the Main page (no matter what url it is viewed through) refers to https://wiki.example/w.
- Easier for test tooling by having a consistent and predictable url for the main page.
- Having a canonical URL that doesn't become a redirect (or dead) when the wiki's configuration is changed, or if the page is renamed for other reasons.
Supported web servers all responds with index.php when viewing the script path. As such, I think we can and should enable this by default.
I'm proposing though, that the default is limited to using the script path as the canonical url, not the domain root. It depends on site configuration whether the domain root is actually rewritten to MediaWiki or not. That is, a domain may have something else at its root and only serve MediaWiki through a sub directory, for example.
Assuming we implement this in a simple and configurable way, then site administrators that do rewrite their domain root to MediaWiki can also flip a configuration switch that will make all the above refer to / instead. The how-to guide at https://www.mediawiki.org/wiki/Manual:Short_URL/Apache also recommends this by default.
As such, most third-party wikis and all WMF wikis, use this already. Without such rewrite, users would not find the wiki when navigating to the website's domain name. Notable exceptions are websites having a wiki as a secondary aspect and not on its own (sub)domain.
T120085 proposes this for for Wikipedia and/or other WMF wikis. We should probably experiment more there fist before considering this as the default.