Always pass a requested wiki to NSW
Open, NormalPublic

Description

Currently, NoSuchWiki relies on an HTTP_REFERER to be set - this shouldn't be relied on to pass a subdomain to NSW because half the time it'll be empty or non-existent as HTTP_REFERER is often stripped or not set by privacy tools/browsers and doesn't help us if the user is coming directly or from a non-ShoutWiki site.

The solution would appear to be to piggyback off the (untidy) logic already present in LocalSettings.php and combine $lang.$sub where necessary (probably in a new variable?) and feed users to Special:NoSuchWiki/$lang.$sub. This would then make it relatively easy to find a log entry if it exists, check if a wiki already exists and feed there and if it doesn't, show the page without log entries. It also kills our need to have an additional million and two lines of request / wiki handling.

DeltaQuad triaged this task as Normal priority.Dec 19 2016, 12:13 AM

So NoSuchWiki no longer uses HTTP_REFERER as browsers don't set this often enough for this to be reliable.

NSW itself works for everything, however, to support wikis using language prefixes (sub-sub-domains) a further modification of LocalSettings.php is needed to provide this as a parameter to Special:NoSuchWiki (as a single string combined with $sub).