Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
- It is not feasible to rewrite the FQDN using Rewrite Rules
- While you may change the "Host" header to point to a different FQDN, the requests will still go the Backend Pool which you have configured in your Routing Rule.
- This is exactly what is happening in the example references
-
Instead, you should consider "Redirection",
- In your case, it should be "Redirect to external site"
- See how to : https://learn.microsoft.com/en-us/azure/application-gateway/redirect-external-site-powershell
- Currently, I am afraid this does not support "conditional redirection" where you can achieve this behavior with an If condition.
- If the parameters you use for the If condition are in the URL path, you can use a combination of "path-based routing rules" + "Redirect to external site".
Hope this clarifies.
Cheers,
Kapil