Hi,
I am trying to configure rewrite rules for a Wordpress MU 2.7 on IIS7 with PHP5 (fastcgi).
At the moment I only have the following rewrite rule in Web.config:
<rule name="Canonical Host Name" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" negate="true"
pattern="^subdomain\.example\.com$" />
</conditions>
<action type="Redirect"
url="http://subdomain.example.com/{R:1}"
redirectType="Permanent" />
</rule>
At the moment when I enter a URL (see below) it does redirect to the right hostname but for some reason prepends the path with a index.php/
:
url: `http://subdomain/my/path/123`
redirects to: `http://subdomain.example.com/index.php/my/path/123`
should redirect to: `http://subdomain.example.com/my/path/123`
Does anyone have an idea why this is and how I can prevent this from happening?
Am I missing a certain server setting or something...? php.ini? web.config rule? Or is it just my rewrite rule that's wrong?
Edit: This problem seems to have nothing to do with Wordpress's permalink structure! The behaviour is the same if I remove of redirect index.php
. I don't think any PHP code is running... this has to be at a higher level.