I assume the first edition will not work. The second rule from the first edition is the same as the second edition.
Your problem is that the rules have the same attribute on the name Sendy all . This is in the Illegal web configuration. Rename one rule.
Also take a look at this node (which is good for debugging):
<?xml version="1.0" encoding="UTF-8" ?> <configuration> <system.webServer> <httpErrors errorMode="Detailed" /> </system.webServer> </configuration>
Make sure this is one of the first things to do in web.config . You will then receive an error code 500.52 with a detailed description that indicates this error.
Gradually the problem, I do not understand what you are trying. Think to query your PHP index:
<rule name="Sendy all" stopProcessing="true"> <match url="^api/(.+?)$" ignoreCase="true" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Rewrite" url="index.php?api=1&request={R:1}" appendQueryString="true" /> </rule>
If you call website.tld/api/IBar/DoFoo , you can write:
$isApi = isset($_GET['api']); //Was the API Rule Affected? $request = isset($_GET['request']) ? $_GET['request'] : ''; //"IBar/DoFoo"
Unless you retrieve the Details and specify them as a Parameter, the entire link to Url Rewrite has no meaning.
Christian gollhardt
source share