Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Web App subfolder different website

Tags:

I have our website on an Azure Web App plan at www.domain.com. This website is running an MVC 4 application and is working great. I have started to configure a blog on another azure website in my plan and would like it to be at the URL www.domain.com/blog instead of a blog.domain.com subdomain.

How do I accomplish this? Do I need to do some clever DNS settings? I'm unsure of the best technique that will also not screw around with the MVC website on the root.

like image 850
kalabo Avatar asked Jun 23 '16 21:06

kalabo


1 Answers

You can set rules in your main www.domain.com IIS server to rewrite /blog requests to another domain-blog.azurewebsites.net Azure App Service.

Something like this:

<rule name="Rewrite to blog site" stopProcessing="true">
      <match url="^blog$" />
      <action type="Rewrite" url="https://domain-blog.azurewebsites.net/{R:0}" />
</rule>

Take a look at this article https://tomssl.com/2015/06/15/create-your-own-free-reverse-proxy-with-azure-web-apps/

like image 94
Maksim Skutin Avatar answered Nov 14 '22 21:11

Maksim Skutin