Changes from trunk/wp-admin/network.php at r22982 to branches/3.5/wp-admin/network.php at r23296
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.5/wp-admin/network.php
r22982 r23296 313 313 $slashed_home = trailingslashit( get_option( 'home' ) ); 314 314 $base = parse_url( $slashed_home, PHP_URL_PATH ); 315 $wp_dir_from_root = preg_replace( '#^' . preg_quote( $_SERVER['DOCUMENT_ROOT'], '#' ) . '#', '', ABSPATH ); 316 $wp_siteurl_subdir = trailingslashit( '/' . preg_replace( '#^' . preg_quote( $base, '#' ) . '#', '', $wp_dir_from_root ) ); 315 $document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) ); 316 $abspath_fix = str_replace( '\\', '/', ABSPATH ); 317 $home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : str_replace( '\\', '/', get_home_path() ); 318 $wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix ); 317 319 $rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : ''; 318 320 319 $home_path = get_home_path();320 321 321 322 $location_of_wp_config = ABSPATH; … … 412 413 $iis_subdir_replacement = $subdomain_install ? '' : '{R:1}'; 413 414 414 $web_config_file = <<<EOF 415 <?xml version="1.0" encoding="UTF-8"?> 415 $web_config_file = '<?xml version="1.0" encoding="UTF-8"?> 416 416 <configuration> 417 417 <system.webServer> … … 425 425 $web_config_file .= ' 426 426 <rule name="WordPress Rule for Files" stopProcessing="true"> 427 <match url="^ {$iis_subdir_match}files/(.+)" ignoreCase="false" />428 <action type="Rewrite" url=" {$iis_rewrite_base}wp-includes/ms-files.php?file={R:1}" appendQueryString="false" />427 <match url="^' . $iis_subdir_match . 'files/(.+)" ignoreCase="false" /> 428 <action type="Rewrite" url="' . $iis_rewrite_base . 'wp-includes/ms-files.php?file={R:1}" appendQueryString="false" /> 429 429 </rule>'; 430 430 } 431 431 $web_config_file .= ' 432 432 <rule name="WordPress Rule 2" stopProcessing="true"> 433 <match url="^ {$iis_subdir_match}wp-admin$" ignoreCase="false" />434 <action type="Redirect" url=" {$iis_subdir_replacement}wp-admin/" redirectType="Permanent" />433 <match url="^' . $iis_subdir_match . 'wp-admin$" ignoreCase="false" /> 434 <action type="Redirect" url="' . $iis_subdir_replacement . 'wp-admin/" redirectType="Permanent" /> 435 435 </rule> 436 436 <rule name="WordPress Rule 3" stopProcessing="true"> … … 443 443 </rule> 444 444 <rule name="WordPress Rule 4" stopProcessing="true"> 445 <match url="^ {$iis_subdir_match}(wp-(content|admin|includes).*)" ignoreCase="false" />446 <action type="Rewrite" url=" {$iis_rewrite_base}{R:1}" />445 <match url="^' . $iis_subdir_match . '(wp-(content|admin|includes).*)" ignoreCase="false" /> 446 <action type="Rewrite" url="' . $iis_rewrite_base . '{R:1}" /> 447 447 </rule> 448 448 <rule name="WordPress Rule 5" stopProcessing="true"> 449 <match url="^ {$iis_subdir_match}([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />450 <action type="Rewrite" url=" {$iis_rewrite_base}{R:2}" />449 <match url="^' . $iis_subdir_match . '([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" /> 450 <action type="Rewrite" url="' . $iis_rewrite_base . '{R:2}" /> 451 451 </rule> 452 452 <rule name="WordPress Rule 6" stopProcessing="true"> … … 457 457 </rewrite> 458 458 </system.webServer> 459 </configuration> 460 EOF; 459 </configuration>'; 461 460 462 461 ?>
Note: See TracChangeset
for help on using the changeset viewer.