I am able to access rest api on the main site, but not on the subsites. WPMU is running on IIS.
I'm sure it's likely the web.config but I have also checked WP Cerber and WP Rocket (explicitly not caching wp-json) to be sure and these don't seem to be causing the issue. I am getting a 404 trying to access it on all subsites.
Below is my webconfig. Any assistance is appreciated 🙂
<rules>
<rule name="JSON 1">
<match url="\^wp-json/?$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="index.php?json\_route=/ other" />
</rule>
<rule name="JSON 2">
<match url="\^wp-json(.\*)?" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="index.php?json\_route=$matches\[1\]" />
</rule>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="\^(.\*/)?files/$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="index.php" />
</rule>
<rule name="WordPress Rule 2" stopProcessing="true">
<match url="\^(\[\_0-9a-zA-Z-\]+/)?files/(.+)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="true" />
</rule>
<rule name="Imported Rule 3" stopProcessing="true">
<match url="\^(.+)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{URL}" pattern="\^.\*/wp-admin$" ignoreCase="false" />
</conditions>
<action type="Redirect" url="{R:1}/" redirectType="Permanent" />
</rule>
<rule name="Imported Rule 4" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions logicalGrouping="MatchAny" trackAllCaptures="false">
<add input="{REQUEST\_FILENAME}" matchType="IsFile" ignoreCase="false" />
<add input="{REQUEST\_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
</conditions>
<action type="None" />
</rule>
<rule name="Imported Rule 5" stopProcessing="true">
<match url="\^(\[\_0-9a-zA-Z-\]+/)?(wp-.\*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:2}" />
</rule>
<rule name="Imported Rule 6" stopProcessing="true">
<match url="\^(\[\_0-9a-zA-Z-\]+/)?(.\*\\.php)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:2}" />
</rule>
<rule name="Imported Rule 7" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="index.php" />
</rule>
</rules>
