WebApps as ARR

Last year, I describe WebApps with File Share for hosting static website.

I find another way.

WebApps can ARR if you transform applicationHost.

<!-- D:\home\site\applicationHost.xdt -->
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <system.webServer>
    <proxy xdt:Transform="InsertIfMissing"
      enabled="true"
      preserveHostHeader="false"
      reverseRewriteHostInResponseHeaders="false" />
  </system.webServer>
</configuration>
<!-- D:\home\site\wwwroot\web.config -->
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <urlCompression doStaticCompression="false" doDynamicCompression="false" />
        <rewrite>
            <rules>
                <rule name="BlobNotSlashEnd">
                    <match url="^.*[^/]$" />
                    <action url="https://storageaccount.blob.core.windows.net/containername{PATH_INFO}" type="Rewrite" />
                </rule>
                <rule name="BlobSlashEnd">
                    <match url="^.*/$" />
                    <action url="https://storageaccount.blob.core.windows.net/containername{PATH_INFO}index.html" type="Rewrite" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

You'll only receive email when they publish something new.

More from iwate