0

We are migrating our old site on prem to a new one hosted on Azure but we need to maintain the old site online. So imagine the following scenario: new site: www.site.com old site: www.oldsite.com

This is what we need: if a user enter www.site.com/somepath and "/somepath" doesn't exist (url not found), it must be redirected to the onprem www.oldsite.com/somepath

Is it possible? How to write the Azure application gateway rule for url not found?

Thank you in advance, Marco

Vijisankar
  • 48
  • 3
mtallon
  • 59
  • 1
  • 7

2 Answers2

0

URL path based rules support notion of default path which is used when none of the path rules match. In your scenario you could set a default backend pool which redirects user to oldsite.com/somepath for any request received. You can then configure path based routing so that site/somepath goes to new pool, site.com/somepath2 goes to another pool.. if none of the url paths match the request would be sent to default pool from where it could be redirected to oldsite.

Vijisankar
  • 48
  • 3
  • www.newsite.com is a wp on Azure webapp www.oldsite.net is a set of websites hosted on-prem on IIS and balanced by F5 possible scenarios: - www.newsite.com/somepath1 and "somepath1" exists on www.newsite.com -> stay on www.newsite.com; - www.site.com/somepath2;"/somepath2" doesn't exists on www.newsite.com (error 404) -> must be redirected to then on-prem www.oldsite.net/somepath2: any 404 url not found on www.newsite.com must be redirected to the same path on www.oldsite.net Is application gateway the solution? How to write path rules? Could you please provide an example? – mtallon Feb 11 '18 at 19:50
-2

I believe you are use a URL Redirect to achieve this.

Create an application gateway with URL path-based redirection using Azure PowerShell

https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-external-site-redirect-powershell

In addition, if you open the links provided and look to the left you will see even more options. Some of which you might find useful.

micahmckittrick
  • 1,476
  • 8
  • 11