How to set a default page on Azure Web App

11,367

Web Apps allow you to specify the default page. You'll find this in the various settings:

default documents

However: This isn't going to let you specify a virtual directory path, such as /en or /nl as you have shown. You'll need to deal with redirects within your app / routes / etc.

Share:
11,367

Related videos on Youtube

Tom Kustermans
Author by

Tom Kustermans

Updated on June 04, 2022

Comments

  • Tom Kustermans
    Tom Kustermans almost 2 years

    I'm having a problem with a redirect to a default page.

    I have https://url.to.azure.website.net but when I just go to this page it responds with a 403 forbidden. I know this is due to a missing default page.

    However when I go to https://url.to.azure.website.net/en/home.html, I do get my home page.

    How can I set my default page to direct straight to the /nl/home.html ?

    Little extra: Is it possible to not show the ".html" extension in the url?

  • Tom Kustermans
    Tom Kustermans over 7 years
    do you have more insight on how to redirect it ?
  • Dan Mihai Patrascu
    Dan Mihai Patrascu about 6 years
    as David mentioned, you can't redirect to a file from a virtual directory; I ended up setting the Default document to "default.html" and added this file to the root. Default.html contains only a script that redirects to the desired file: window.location = "./myVirtualDirectory/actualDefaultDoc.html"