<configuration>
   <system.webServer>
      <rewrite>
         <rules>
            <rule name="Redirect Old Page" stopProcessing="true">
               <match url="^old-page.html$" />
               <action type="Redirect" url="https://example.com/new-page.html" redirectType="Permanent" />
            </rule>
            <rule name="Remove trailing slash" stopProcessing="true">
               <match url="(.*)/$" />
               <conditions>
                  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
               </conditions>
               <action type="Redirect" redirectType="Permanent" url="{R:1}" />
            </rule>
         </rules>
      </rewrite>
   </system.webServer>
</configuration>