Ticket #10187: 10187.patch
File 10187.patch, 991 bytes (added by , 16 years ago) |
---|
-
pluggable.php
847 847 * @return bool False if $location is not set 848 848 */ 849 849 function wp_redirect($location, $status = 302) { 850 global $is_IIS ;851 850 global $is_IIS, $server_version; 851 852 852 $location = apply_filters('wp_redirect', $location, $status); 853 853 $status = apply_filters('wp_redirect_status', $status, $location); 854 854 855 855 if ( !$location ) // allows the wp_redirect filter to cancel a redirect 856 856 return false; 857 857 858 858 $location = wp_sanitize_redirect($location); 859 860 if ( $is_IIS) {861 header("Refresh: 0; url=$location");862 } else {863 if ( php_sapi_name() != 'cgi-fcgi' )864 status_header($status); // This causes problems on IIS and some FastCGI setups859 860 if($is_IIS == true && $server_version <= 5) { 861 header("Refresh: 0; url=$location"); 862 } 863 else { 864 status_header($status); 865 865 header("Location: $location"); 866 866 } 867 867 }