0

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?

joym8
  • 4,014
  • 3
  • 50
  • 93

2 Answers2

1

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>
Dmitry Bastron
  • 694
  • 3
  • 11
  • I will try this as soon as i can get rid of the runtime error im facing right now: https://stackoverflow.com/q/60821826/1541224 – joym8 Mar 24 '20 at 13:35
  • Doing this with Kentico web.config gives the error `HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.` – joym8 Mar 25 '20 at 19:53
  • I didn't have URL Rewrite module for IIS installed locally. This worked after installing the module. https://www.iis.net/downloads/microsoft/url-rewrite – joym8 Mar 25 '20 at 20:37
0

Can you check your site configuration:

admin config

Also check if there are no other sites installed.

DTK
  • 470
  • 1
  • 3
  • 7
  • In site domain name, we have kentico instead of admin. And in the presentation URL we have www after https:// - i guess we don't need to change anything here right? – joym8 Mar 23 '20 at 19:42
  • Ah yes that should be fine! Have you set forced SSL for the Admin interface, in the settings of Kentico ? And set HTTPS only to your Web App in the Azure Portal? – DTK Mar 23 '20 at 21:14