Fixing "Too many redirects" error in MediaWiki
July 21, 2007
PHP | Web Building

I run a wiki for my fish fancier's site, based on "MediaWiki." It had been running fine, except for an increasing problem with spam, but one day it simply stopped working. Browsing to the site would result in the following error message:

Too many redirects occurred trying to open "". This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.

(Click to enlarge image)

Ads by Google

Posted by ellen at July 21, 2007 06:47 PM

I checked the database thoroughly to determine if I had made any recent revisions that might have redirected one page to another, but it did not appear to be the case. I even restored the database to a backup from several months ago, and it did not help matters. The .htaccess files all appeared to be untouched.

I found that URL's of the type:

always resulted in the error. However using the long form,

worked fine. I found that in localsettings.php, you can choose whether to use the ugly URLs or the pretty ones. Setting them to pretty now results in the redirect error on my site.


Setting them to "ugly" works fine.

(Click to enlarge image)

I can only assume that some change was made to the apache settings by my webhost which affected this type of redirect.

Update: It turned out this was caused by the webhost enabling PhpSuexec on the server. Additional information on this is here:

  • MediaWiki + phpSuEXEC = Fail?

  • PhpSuexec - what do I need to know?

  • Ads by Google


    Just wanted to say thanks for this info, it helped me move a mediawiki installation from one ISP host to another. I needed to update includes/DefaultSettings.php and LocalSettings.php like these pages say, and so far the new installation is working just fine.

    I'm stoked that the same URLs will now work on the new site, thanks !

    yup, this post solved my prob too, many thanks :)


    You are Great !!! Hanging so many days for that...
    Really thank you

    Thanks! Worked for me, as well...

    Ads by Google

     RSS   |   Contact Me

    Ads by Google