User:Barrylb/Fix for ampersand in titles

When you are 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 my 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']); }

Barrylb 19:37, 17 July 2006 (UTC)