'b', 'wikinews' => 'n', 'wikipedia' => 'p', 'wikiquote' => 'q', 'wikisource' => 's', // forward compatibility, unused ATM 'wikiversity' => 'v', // forward compatibility, unused ATM 'wikivoyage' => 'y', 'wiktionary' => 't', ]; list( $protocol, $host ) = getProtocolAndHost(); if ( strpos( $host, '.m.' ) !== false ) { // Invalid request to mobile site, not rewritten by Varnish showMobileError(); return; } # $language.$project.org $tmp = explode( '.', $host ); $project = $incubatorCode = false; if ( count( $tmp ) == 3 ) { list( $language, $project, $tld ) = $tmp; if ( isset( $_SERVER['PATH_INFO'] ) && preg_match( '!^/(.*)$!', $_SERVER['PATH_INFO'], $m ) ) { $page = $m[1]; } elseif ( isset( $_GET['title'] ) ) { $page = $_GET['title']; # index.php?title=Page } else { $page = ''; # Main page } $incubatorCode = isset( $projects[$project] ) ? $projects[$project] : null; } if ( !$incubatorCode ) { showGenericError(); return; } if ( strpos( $page, ':' ) !== false ) { # Open the interwiki file to see if we have an interwiki prefix $db = null; try { $db = include __DIR__ . '/interwiki.php'; } catch ( Exception $e ) { } if ( $db ) { $prefix = strtok( $page, ':' ); # Try looking for lateral links (w: q: voy: ...) $row = null; if ( isset( $db[ "{$language}wiki:$prefix" ] ) ) { $row = $db[ "{$language}wiki:$prefix" ]; } if ( !$row ) { # Also try interlanguage links $projectKey = ( $project === 'wikipedia' ? 'wiki' : $project ); if ( isset( $db[ "_$projectKey:$prefix" ] ) ) { $row = $db[ "_$projectKey:$prefix" ]; } } if ( $row ) { list( $iw_local, $iw_url ) = explode( ' ', $row ); if ( $iw_local ) { # Redirect to the appropriate WMF wiki # strtok gives us the remainder of the page title after the interwiki prefix showRedirect( str_replace( '$1', strtok( '' ), $iw_url ) ); return; } } # We don't have an interwiki link, keep going and see what else we could have } } if ( $project === 'wikisource' ) { # Wikisource should redirect to the multilingual wikisource showRedirect( $protocol . '://wikisource.org/wiki/' . $page ); } elseif ( $project === 'wikiversity' ) { # Wikiversity gives an error page showMissingSubdomainError( $project, $language ); } else { # Redirect to incubator $incubatorBase = 'incubator.wikimedia.org/wiki/'; $location = $protocol . '://' . $incubatorBase . 'W' . $incubatorCode . '/' . urlencode( $language ); # Go to the page if specified (look out for slashes), otherwise go to # the main page Wx/xyz?goto=mainpage (WikimediaIncubator extension takes care of that) $location .= $page && $page !== '/' ? '/' . $page : '?goto=mainpage' . ( isset( $_GET['uselang'] ) ? '&uselang=' . urlencode( $_GET['uselang'] ) : '' ); showRedirect( $location ); } } /** * Obtaining the full self URL * @return string Actual URL except for fragment part */ function getProtocolAndHost() { if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) { $protocol = 'https'; } else { $protocol = 'http'; } if ( defined( 'MISSING_PHP_TEST' ) && isset( $_GET['host'] ) ) { $host = $_GET['host']; } else { $host = $_SERVER['HTTP_HOST']; } $host = strtolower( $host ); return [ $protocol, $host ]; } /** * Get a stylesheet with the specified logo in the background. * @param string $logo * @return string */ function getStyleSheet( $logo ) { return << Internal error

Internal error

Mobile domains are not served from this server IP address.

A project of the Wikimedia Foundation

[ 'logo' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Wikiversity-logo.svg/300px-Wikiversity-logo.svg.png', 'home' => 'https://beta.wikiversity.org', 'name' => 'Wikiversity', 'home-name' => 'Beta Wikiversity', ] ]; $info = $projectInfos[$project]; header( 'HTTP/1.x 404 Not Found' ); header( 'Content-Type: text/html; charset=utf-8' ); $escLanguage = htmlspecialchars( $language ); $escName = htmlspecialchars( $info['name'] ); ?> <?php echo "$escLanguage $escName"; ?> does not exist

This wiki does not exist

Welcome to

Unfortunately, in "" does not exist on its own domain yet, or it has been closed.

You may like to visit to start or improve there.

If you would like to request that this wiki be created, see the requests for new languages page on Meta-Wiki.

A project of the Wikimedia Foundation

No wiki found

No wiki found

Sorry, we were not able to work out what wiki you were trying to view. Please specify a valid Host header.

A project of the Wikimedia Foundation

The document has moved. HTML; } handleMissingWiki();