kenticokentico-mvc

How to redirect Kentico to CMS admin page by default


We're using Kentico 11 along with a single MVC website, both hosted as Azure app services.

Our company's URL looks like www.mycorp.com and Kentico CMS URL looks like kentico.mycorp.com

When someone goes to kentico.mycorp.com, it shows a blank page. We need to type kentico.mycorp.com/admin to get to the CMS.

Is there a way a redirect can be set up without adding any new DNS entry or a web app in IIS?


Solution

  • Try the following in your CMS web.config:

    <configuration>
    ..
      <system.webServer>
        <rewrite>
          <rules>
            <rule name="AdminRedirect" stopProcessing="true">
              <match url="^$" />
              <action type="Redirect" url="/admin" />
            </rule>
          </rules>
        </rewrite>
      </system.webServer>
    ..
    </configuration>