man999,
only that didn't work for me with IIS MOD-Rewrite PRO (or ISAPI_Rewrite3). I had to change some code in wp-settings.php. Why? I have a WPSU running perfectly with only adding
$_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'HTTP_X_ORIGINAL_URL' ];
I open up the WPSU wp-settings.php and found some differences with wp-settings.php for WPMU. In WPMU it looks like this:
// Fix for IIS, which doesn't set REQUEST_URI
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?
// Append the query string if it exists and isn't null
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
}
and for WPSU 2.3 wp-settings.php it looks like this:
// Fix for IIS, which doesn't set REQUEST_URI
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
// IIS Mod-Rewrite
if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
}
// IIS Isapi_Rewrite
else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
}
else {
// If root then simulate that no script-name was specified
if (empty($_SERVER['PATH_INFO']))
$_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/';
elseif ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
// Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
else
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
// Append the query string if it exists and isn't null
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
}
}
Just put that code into WPMU wp-settings.php (don't forget wp-config.php code above) and it will work PERFECTLY! ... except one small thing ... no UPPERCAPS in blogname/username. You can change that in wpmu-functions.php. Search for [a-zA-Z0-9 .... remove A-Z and also that problem is solved.
Remember ... I'm not a php-coder, just a "cut and past PHP-coder" *|o|*