question

Nibbler avatar image
0 Votes"
Nibbler asked KamalDua-6671 commented

Azure Front Door - Rule Engine

Hello there,

It dosent seem that the Rule Engine is working on the simplest of rules, like adding a trailing slash in the end of a URL path request.


Exsample. A end-user types "www.test.com/test" and a rule should add the trailing dash in the end = "www.test.com/test/"

Does anybody had any luck getting it to work, and any takes on this issue? Adding a / in the end of a URL path request.

24790-test.jpg



Thanks.

azure-front-door
test.jpg (180.6 KiB)
· 11
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@GitaraniSharmaMSFT-4262 Are you able to help with this one?

0 Votes 0 ·

Hello @KianE1980 ,

You can create the rule with URL rewrite functionality as shown in below screenshot. Let me know if that helps:

24923-frontdoorruleslash.jpg



Thanks,
Gita

0 Votes 0 ·
Nibbler avatar image Nibbler GitaraniSharmaMSFT-4262 ·

Hi Gita,

It does not work.

// The rule is not working
// Removing the dash from a URL path you will be directed to a azure back-pool path

I have made a reply in this thread with addtional information and screendumps

Cheers, K

0 Votes 0 ·

Hi @GitaraniSharmaMSFT-4262

Thanks for feedback. I really appreciate it.

I have tried this rule configuration, but i dosent work. When I type the URL (with no dash) I get the azure URL for the "test-landingpage. " (See sceendumps.

The setup I’m trying to get up and running is 4 sites, 1 landingpage and 3 separate sites (base on 4 different webapps)

All is working, but not the rules. I have attached some screendumps.

24894-slide1.jpg24903-slide2.jpg


0 Votes 0 ·
slide1.jpg (38.1 KiB)
slide2.jpg (71.5 KiB)

Hi @GitaraniSharmaMSFT-4262

Do you have any good thoughts on this issue? Please let me know if you need further details.

Cheers, Kian

0 Votes 0 ·

Hello @KianE1980 ,

Apologies for the delay in my response.

Did you also try to create each Routing rule with URL rewrite functionality as below:

25236-routingrule.jpg


0 Votes 0 ·
routingrule.jpg (68.1 KiB)
Nibbler avatar image Nibbler GitaraniSharmaMSFT-4262 ·

Hi Gita,

Yes, that one I have tried, and did not work - and one can only have /* in one routing rule. If you try to add an additional /' to other routing rules you will get an error (as in the screenshots)
25129-capture.jpg


0 Votes 0 ·
capture.jpg (44.3 KiB)
Show more comments

1 Answer

GitaraniSharmaMSFT-4262 avatar image
0 Votes"
GitaraniSharmaMSFT-4262 answered KamalDua-6671 commented

Hello @KianE1980 ,

Below is the combination of configuration that helped us adding a trailing slash in the end of a URL path request:

27122-fdtrailingslash.jpg


27123-fdtrailingslash2.jpg




Appreciate your co-operation and understanding!


Please don’t forget to close the thread by clicking "Accept the answer", as this can be beneficial to other community members.


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am using wildcard domain on front door, hence it can't be used as replace destination host can not accept wildcard domain.
there has to be some simple way just with pattern matching.

1 Vote 1 ·

Hello @KianE1980 ,

Just checking in to see if the above answer helped. If this answers your query, please don’t forget to click "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

Thanks,
Gita

0 Votes 0 ·
Nibbler avatar image Nibbler GitaraniSharmaMSFT-4262 ·

Ah, sorry Gita. Of course. And i`ll send you screendumps ect. on the other stuff.

All best. Kian

0 Votes 0 ·

Thank you @KianE1980.

0 Votes 0 ·