Last modified: 2010-05-15 15:32:57 UTC
When I visit my MediaWiki 1.4.2 installation at https://www.example.com/wiki I get redirected to https:// www.example.com:443/wiki/index.php/Main_Page. There's no reason for the port number to get inserted there, since it's the default port for https / SSL connections, and it uglies up the URL. Here's the patch to make it not do that anymore (same strategy used by phpMyAdmin): --- includes/DefaultSettings.php (revision 1131) +++ includes/DefaultSettings.php (working copy) @@ -55,7 +55,7 @@ $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; $wgServer = $wgProto.'://' . $wgServerName; -if( isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != 80 ) { +if( isset( $_SERVER['SERVER_PORT'] ) && ( ( $wgProto == 'http' && $_SERVER['SERVER_PORT'] != 80 ) || ( $wgProto == 'https' && $_SERVER['SERVER_PORT'] != 443 ) ) ) { $wgServer .= ":" . $_SERVER['SERVER_PORT']; } unset($wgProto);
Fixed in CVS HEAD, DefaultSettings.php, rev 1.294