Partner and Community Forums
IIS7.5 mishandles HTTP redirect headers from PHP applications that co...
Last post Feb 02, 2012 12:45 AM by hjf1223
Mar 02, 2010 10:21 PM|Lisa Ridley|LINK
This issue was originally reported on the MediaWiki users forums by one of our community members.
The issue at hand here is a mishandling of redirect headers by IIS. While this issue was originally reported to us via the MediaWiki support forums, it is in fact application independent. This issue appears to be isolated to IIS7 as we have been unable
to duplicate the issue on IIS6 or any version of Apache web server.
Whenever a redirect header is sent that contains script parameters that include a special character followed by a colon, IIS7 applies punycoding to the URL, extending into the parameters, and generates a 404.0 error. The following test script will generate
the error message:
header("HTTP/1.1 301 Moved Permanently");
header("Content-Type: text/html; charset=utf-8");
IIS7 converts the redirect url to:
Which of course is invalid, and IIS promptly generate a server error.
This appears to be browser independent (occurs in IE7, IE8 and Firefox).
I'd file a bug report, but frankly after spending a day working on this to isolate the issue, then googling over and over again to find the appropriate spot, this place is the best I could come up with, and I don't know that I'm invested enough to go any
further. I only researched the issue this far because the user that reported the problem to me indicated that he was being told this was an application error and not an IIS error.
It appears that in fact is not the case.
Is there some way to switch this behavior off in IIS7, through some sort of configuration setting, or is this in fact a bug with IIS7?
Mar 03, 2010 10:15 PM|don.raman|LINK
Thank you for reporting this. You have reached the right place. A member of the IIS FastCGI team is working on this and he will get back to you on this as soon as possible.
Again thanks for reporting this.
Mar 04, 2010 05:00 PM|ksingla|LINK
I can confirm that this is a bug in IIS 7.5. We are working on a fix for this.
Mar 04, 2010 05:09 PM|Lisa Ridley|LINK
The MediaWiki development team is implementing a rather ugly workaround for our IIS7 users so that those using languages requiring special characters don't see a 404.0 error, but it results in an ugly URL that is not SEO friendly. As the owner and manager
of the most popular MediaWiki support forum and a MediaWiki developer, I am following this thread and would appreciate it if you would post a note here when you have resolution. We'd like for our international users who choose to run MediaWiki using IIS as
their web server to have SEO friendly URLS as well.
Mar 04, 2010 05:25 PM|ksingla|LINK
We understand that this bug is not there in IIS 7.0 (Win2K8). We see the problem only in IIS 7.5 (Win7/Win2K8 R2). Let us know if you are seeing the issue in IIS 7.0.
Mar 04, 2010 07:42 PM|ksingla|LINK
A simple workaround for the problem is to add ":<port>" in the hostname.
Aug 10, 2010 08:52 PM|emeshuris|LINK
Feb 02, 2012 12:45 AM|hjf1223|LINK
Any updates for this issue?