Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to configure WordPress into a virtual application under a principal website running on ASP.NET 2.0 Classic mode.

Everything is working fine, PHP 5.3.13 / MySQL 5.1 / IIS 7.5, the wordpress site also work fine, except for the rewriting side.

The blog is host at , and rewriting should normally rewrite article to but instead it rewrite to, as you see, it strip the tag between blog and categorie, wich is not suitable.

The rewriting rules inside web.config are pretty straight forward, taken from auto-generated Wordpress Permalink section :

            <clear />
            <rule name="wordpress" patternSyntax="Wildcard" stopProcessing="false">
                <match url="*" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                <action type="Rewrite" url="index.php" appendQueryString="true" />

I've been losing allmost by whole day on this, so I tough asking for it might be a good idea...

Anybody already had that kind of trouble with wordpress on IIS?

Thanks in advance

share|improve this question
What do you have in the Wordpress config for Custom Structure under permalinks (since I guess that's where you're setting this). – EightBitTony May 17 '12 at 21:47
Does the problem occur on all pages, or just category pages? – EightBitTony May 18 '12 at 14:00
All pages are affected by this bug. – Marc-Andre R. May 18 '12 at 14:19
Does my updated code below resolve it? – EightBitTony May 18 '12 at 14:37
I'm out of ideas then (and have deleted my answer since it's not right) - there's a Wordpress Stack Exchange site, have you searched on there? – EightBitTony May 18 '12 at 19:26

I think your problem is a pure WordPress settings issue. The rewrite rules from your post are only important for incoming requests. I.e. they rewrite the URL from an incoming request to the index.php page. They are of no importance for any URL's generated by WordPress and that's clearly where your problem is.

My guess is that you have not properly configured Settings -> General -> WordPress address (URL) and Settings -> General -> Site address (URL). Both should be set to (without a trailing slash). If you use custom permalinks (Settings -> Permalinks) your should leave out /blog in front of it. WordPress will add that automatically as is also shown on that page.

When configured like this, it should work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.