I have a multisite network hosted on Microsoft Azure. I had performed WordPress installation by using the WordPress installation image (not WordPress for Linux) from Azure's marketplace. Later, I created a multisite network and added a subdomain for setting up the website's blog. I used the setup instructions given by WordPress to set up the network (including the content of the web.config
file). This is the content of the web.config
file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WordPress Rule 1" stopProcessing="true">
<match url="^index\.php$" ignoreCase="false" />
<action type="None" />
</rule>
<rule name="WordPress Rule 2" stopProcessing="true">
<match url="^wp-admin$" ignoreCase="false" />
<action type="Redirect" url="wp-admin/" redirectType="Permanent" />
</rule>
<rule name="WordPress Rule 3" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
</conditions>
<action type="None" />
</rule>
<rule name="WordPress Rule 4" stopProcessing="true">
<match url="^(wp-(content|admin|includes).*)" ignoreCase="false" />
<action type="Rewrite" url="{R:1}" />
</rule>
<rule name="WordPress Rule 5" stopProcessing="true">
<match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
<action type="Rewrite" url="{R:2}" />
</rule>
<rule name="WordPress Rule 6" stopProcessing="true">
<match url="." ignoreCase="false" />
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
After installing the multisite network, the images that I upload to both the main domain and the subdomain do not get loaded on the Media Gallery. Only the grey square boxes are shown. And when I try to open them using the URL found after opening the grey square boxes (for example, https://blog.someurl.com/wp-content/uploads/sites/3/2021/04/img.png
or https://someurl.com/wp-content/uploads/sites/3/2021/04/img.png
), I get an error message saying:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
However, the images uploaded to the main site before setting up the multisite network are working fine. And the newly uploaded images that aren't loading are also being stored in the storage.
Could anyone help me out with this issue?