WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Windows Server 2008 with IIS7 and WordPress 2.6.2 ++ (1 post)

  1. Frumph
    Member
    Posted 5 years ago #

    I found a bit of code that was "wrong" for IIS7, at least on my installation.

    Its a problem with some of my users and others with wordpress with "blank pages" after submitting, especially in the admin area.

    The old code is doing a refresh if its an $is_IIS however that doesn't work so I reverted it back to Location: and everything works fine.

    function wp_redirect($location, $status = 302) {
    	global $is_IIS;
    
    	$location = apply_filters('wp_redirect', $location, $status);
    	$status = apply_filters('wp_redirect_status', $status, $location);
    
    	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
    		return false;
    
    	$location = wp_sanitize_redirect($location);
    
    	if ( $is_IIS ) {
    //		header("Refresh: 0;url=$location");
    		header("Location: $location");
    	} else {
    		if ( php_sapi_name() != 'cgi-fcgi' )
    			status_header($status); // This causes problems on IIS and some FastCGI setups
    		header("Location: $location");
    	}
    }
    endif;

Topic Closed

This topic has been closed to new replies.

About this Topic