Showing posts with label Azure App service. Show all posts
Showing posts with label Azure App service. Show all posts

Friday, June 4, 2021

Redirect azure website to SharePoint Online or any other url

Below is the url rewrite rule added in azure webapp config to redirect the site to any new location, let it be a SPO site or any other web url. The sample below redirects to the microsoft password reset page.

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

  <system.webServer>

    <rewrite>

      <rules>

         <rule name="SimpleURL" patternSyntax="ECMAScript" stopProcessing="true">

                                                          <match url="(.*)"/>

                                                          <action type="Redirect" url="https://aka.ms/sspr/?whr=domain" redirectType="Permanent" appendQueryString="true" />

                                           </rule>

                                           </rules>

    </rewrite>

  </system.webServer>

</configuration>