wiki.techinc.nl/redirect.php
Sam Reed 71ef827d54 Set a HTTP 301 header in redirect.php
Upstream wikia change
2011-09-03 22:50:44 +00:00

21 lines
510 B
PHP

<?php
/**
* Script that redirects to the article passed in the "wpDropdown" parameter.
* This is used by the nostalgia skin for the special pages drop-down
*
* @file
*/
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'phase3/includes/WebStart.php' );
} else {
require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
}
global $wgArticlePath;
$page = $wgRequest->getVal( 'wpDropdown' );
$url = str_replace( "$1", urlencode( $page ), $wgArticlePath );
header( "Location: {$url}", true, 301 );