Using a URL Rewrite in the Rule sets After Route is not working

JUNIOR CABEZAS RODRIGUEZ 0 Reputation points
2025-02-15T05:56:26.4166667+00:00

I have two APIs, the structure is almost the same, but they should go to different backend pool, So I create "Resources" and "Resources2" as Routes

Resources, pattern to match : "/app/api/resources" (origin "server1")

Resources2, pattern to match : "/app/api/resourcesv2" (origin "server2")

I want to rewrite them to the origin with the path "/api/resources" or "/api/resourcesv2" for Server1 and Server2, since I need to have the full path to identify the pattern to match, I'm no able to use the "Origin path" with "/", so yes or yes I need to leave the "Origin path" in blank.

So what I thought was to create a rule set after the routing, something like :

User's image

In order to keep the last part of the url path because I needed, now reading some information microsoft said that "URL redirect and URL rewrite with Azure Front Door Standard/Premium (Preview) | Microsoft Learn

Currently, source pattern uses a prefix-based match.

For URL rewrite source pattern, only the path after the route configuration “patterns to match” is considered."

Finally I do not know how to address this case, I need the full path to go one server or another and then I need to rewrite in order to take part of the path, but it is not possible because microsoft only use the path after the route configuration "patterns to match".

Some ideas ? Thanksss

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
750 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.