• Resolved Gabe Shackle

    (@hereswhatidid)


    I’m getting an infinite redirect loop after upgrading from 3 to 3.1. I’m running this on a Windows machine using the ISAPIRewrite module from Helicon. The permalinks were working fine prior to the upgrade and I’ve already tried resaving them via the admin and restarting IIS on the machine in case anything was being cached.

Viewing 15 replies - 61 through 75 (of 98 total)
  • Have to add my 2 cents and say THANK YOU for the plugin link – worked like a charm –

    Tracking this bug on this ticket.

    Had an issue yesterday after updating to 3.1 and my web host had to take my site down. I used the plug-in provided and looks like it fixed the issue. I hope that wordpress developers figure this out soon. I don’t really like the idea of a “patch” fix.

    @shock976: There is an alternative to the “patch” plugin. As reported by “daniel6683” in another thread on the same subject, this particular issue is actually due to a fairly straightforward logic error that crept into the redirect_canonical() function in the wp-includes/canonical.php file’s v3.1 revision.

    First of all, the $is_IIS variable needs to be added to the global declaration on line 38 of that file as follows:
    global $wp_rewrite, $is_IIS, $is_iis7, $wp_query, $wpdb;

    Secondly, on line 40, it needs to test for $is_IIS and, if so, whether it supports permalinks as follows:
    if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( $is_IIS && !iis7_supports_permalinks() ) )

    In other words, on line 40 of canonical.php, “$is_iis7” needs to be be replaced with “$is_IIS”.

    For me the problem was with network subdomains giving the message

    The page isn’t redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    * This problem can sometimes be caused by disabling or refusing to accept cookies.

    Main site worked fine. Pretty sure I’m not on a Windows server. None of the suggested fixes worked for me. I was using custom permalink structure /%category%/%postname%/ which I know is usually not recommended. Just as a last resort I decided to try with the Day and name permalink setting. That seems to have solved the problem for me.

    Fortunately my site is new enough that it shouldn’t cause too big a problem changing the permalink structure.

    The plugin also fixed this issue for our sites, thanks! Hope they get whatever is causing this difficulty squared away soon. I’m not a big fan of work arounds on a basic software.

    Cheers!

    maxsm-
    That;s the same issue I’m having but our site is 7 years old and I’m not changing the permalinks now!
    We are on IIS7

    Is there a way to modify those changes in the canonical.php file through wordpress or do I have to pull it off FTP and edit? Has anyone else had success with the changes mentioned by rvirtue?

    @shock976: Basically, your choices are:
    1. install and activate the plugin mentioned previously, or
    2. edit and replace the WP 3.1 canonical.php file, or
    3. wait for the correction in WP 3.1.1.

    @rvirtue: I altered the file with your mentioned changes, pretty minimal. It was missing a few $is_IIS’s 🙂 I am just waiting for my host to call me so I can disable the plug in, upload the new file, and have him monitor the cpu usage to see if it fixes the issue.

    I will keep everyone updated as well.

    I’m not sure what you mean by “missing a few $is_IIS’s”. The only file edits needed to correct the infinite redirect issue on a Windows/IIS platform are the two I mentioned. In fact, you could actually remove the $is_iis7 variable from the global declaration (line 38) but it does no harm to leave it there so long as $is_IIS is included.

    Did you notice some other errors in that canonical.php file?

    This is what my original file looked like:

    global $wp_rewrite, $is_iis7, $wp_query, $wpdb;

    if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( && !iis7_supports_permalinks() ) )


    This is what I changed (IN BOLD)

    global $wp_rewrite, $is_IIS, $is_iis7, $wp_query, $wpdb;

    if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( $is_IIS && !iis7_supports_permalinks() )

    Is that correct?

    Yup. That should do it.

    silverlight001

    (@titaniumconsulting)

    Hi,

    We have over a dozen WordPress blog hosted on a Windows IIS server and installing the plugin

    http://wordpress.org/extend/plugins/permalink-fix-disable-canonical-redirects-pack/

    does indeed fix this issue

    However, does this highlight a WordPress release flaw that they did not test on Windows servers??

    Something to be included in the test scripts for next time WordPress folks please?

    @rvirtue: Had my host look through my site, I deactivated the Plugin, and uploaded the file with those changes highlighted above and all is well. Thank you very much for the help!

Viewing 15 replies - 61 through 75 (of 98 total)
  • The topic ‘Windows server infinite redirect after upgrading to 3.1’ is closed to new replies.