I'm about to move a multisite Wordpress site from Linux and nginx to IIS. I've set up a server with Windows 2012 R2. The problem is that the site users have used non-ascii characters in media file names. Everything is in UTF-8, database, php-files, etc. All files have been moved with preserved filenames, etc. What happens is that when the rule for fetching media files are matched, the rewrite engine changes the file name with non-ascii characters in. I have a failed request trace below that shows what is happening:
33. Rule match, look at the URL!
34. Querystring is URL-encoded. All non-ascii characters are encoded as if they were UTF-8 (correctly)
35-37. The child request is made, but with the wrong characters. If you take the quesystring from step 34 and treat it as iso-8859-1, you get this result when you url-decode it. This request fails, since there are no file named like that.
What should I change and where? In my opinion the URL Rewrite Module makes a mistake here, but how can I tell how to behave?
<div id="section_detail_33_details">Substitution | wp-includes/ms-files.php?file={R:2} |
---|---|
RewriteURL | /wp-includes/ms-files.php?file=2013/12/Grävling_mårdfällor.jpg |
AppendQueryString | false |
LogRewrittenURL | false |