* Add 'GetInternalURL' hook to match the GetFullURL and GetLocalURL ones
[lhc/web/wiklou.git] / redirect.php
1 <?php
2 unset( $DP );
3 unset( $IP );
4 $wgCommandLineMode = false;
5 define( 'MEDIAWIKI', true );
6 if ( isset( $_REQUEST['GLOBALS'] ) ) {
7 die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
8 }
9
10 require_once( './includes/Defines.php' );
11 require_once( './LocalSettings.php' );
12 global $wgArticlePath;
13
14 require_once( 'includes/WebRequest.php' );
15 $wgRequest = new WebRequest();
16
17 $page = $wgRequest->getVal( 'wpDropdown' );
18
19 $url = str_replace( "$1", urlencode( $page ), $wgArticlePath );
20
21 header( "Location: {$url}" );
22 ?>