I am trying to use the SLIM framework (PHP, REST) on a IIS 7.5. The problem i have is that i need to be able to use REST URL´s AND enable PUT,DELETE http verbs.
I have solved the REST URL problem with the help of SLIM on github (se web.config below). But i can´t solve the problem on activating the use of the verbs when i use URL rewrite.
Here is the error i receive: HTTP Error 405.0 - Method not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070001
This is my web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule"/>
</modules>
<rewrite>
<rules>
<rule name="slim" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>