User:Barrylb/Fix for ampersand in titles

When using Apache mod_rewrite to make friendly URLS it screws up ampersands in titles.

If you do not have the ability to patch Apache like Wikipedia's solution, try this solution which modifies the MediaWiki code to extract the title from the $_SERVER variable. Tested and working on 1.6.7.

Modify includes/WebRequest.php - function WebRequest - put the following after : global $wgArticlePath; if (strpos($_SERVER['SCRIPT_NAME'], 'index.php') === false) { $articlePathPart = str_replace('$1','',$wgArticlePath); $_GET['title'] = $_REQUEST['title'] = str_replace($articlePathPart, '', $_SERVER['SCRIPT_NAME']); }