Thursday, October 14, 2010

WordPress Redirects not working on Firefox and IIS installations

Basically I was getting this problem on wordpress 3.0.1 on IIS7 installs. On any other browser a redirect would work perfect except firefox. Which redirects you may ask? Well for instance,

  1. going to /wp-admin/ landed on a white page rather than redirecting to wp-login.php
  2. from the login it would just freeze on a white page after hitting the log-in button

So what did I do? I traced the function call and saw that it ends in /wp-includes/pluggable.php on line 874 function qp_redirect and within this function there is the following lines of code

As you can see the $is_IIS if, this is what basically runs when the install is on IIS. and that particular header() call is not responding with firefox so I added another rule to the if statement to only run if it is on IIS and is nto firefox as follows:

Tested and it works without a problem. Hope this helps anyone cause it was driving me NUTS!

Post a Comment