URL Rewrites with IIS 7

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

URL Rewrites with IIS 7

rjakes
Windows Server 2012, IIS 7, PHP 5.3, FuelPHP, running a site that uses Shibboleth for authentication. Static pages work as expected, but, pages running under the Fuel framework, with URLs rewritten to index.php fail with 'page not found'. The full query string is passed to Fuel, and since Fuel has no matching controller, the 'page' is not found.

The authentication server sends back a return value of <mysite>/Shibboleth.sso<lots of stuff>. The Shibboleth.sso command is sent through to FuelPHP and fails. When I remove the rewrite rules, Shibboleth properly parses the query string and sends me to the correct target.

Here is the webconfig that causes the failure:

    <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
        <system.webServer>
          <rewrite>
            <rules>
              <rule name="Index" stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions logicalGrouping="MatchAll">
                  <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php/{R:1}" />
              </rule>
          </rules>
        </rewrite>
            <defaultDocument>
                <files>
                    <add value="index.php" />
                </files>
            </defaultDocument>
      </system.webServer>
    </configuration>

Any idea how to get Shibboleth to play nice with IIS URL rewriting?