question

Emanuele-0211 avatar image
0 Votes"
Emanuele-0211 asked Emanuele-0211 commented

Rewrite on Application Gateway with path based rule

Hi,

i would like to implement a rewrite rule on my Application Gateway. Now i setup a path based rule that do following:

if i reach this url mywebsite.it/myapplication redirect to another http.setting configured on other app service.

It work nice but when i reach the other app service from mywebsite.it/myapplication, it change the url with url, mywebsite.it/sign etc....


Is possbile to rewrite it with other url?

example, from actual configuration with that path based rule:

I tried to setup override path, to configure some rewrite but the the test failed, i always get mywebsite.it/sign

Any help is appreciated


azure-application-gateway
· 7
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.

Hello @Emanuele-0211 ,

Apologies for the delay in response.

Could you please share the screenshot of your rewrite rule?

Please refer the below article which shows how to combine URL Rewrite capability and path-based routing:
https://docs.microsoft.com/en-us/azure/application-gateway/rewrite-http-headers-url#parameter-based-path-selection

Thanks,
Gita

0 Votes 0 ·

Hello @Emanuele-0211 , do you have any updates on this issue?

0 Votes 0 ·
Emanuele-0211 avatar image Emanuele-0211 GitaraniSharmaMSFT-4262 ·

Hi @GitaraniSharmaMSFT-4262 , sorry but i was on holiday

I tried that link without success. Following the rewrite rule:

128673-01.png


128547-02.png


there is a pathbased rule for "mywebsite.it/myapplication/*" that goes to app service "mywebsite.it/sign/*" .
I need that from "mywebsite.it/myapplication/*" to setup "mywebsite.it/function/*" and keep the path after the "*" . I configured also a query string with /resume:

eg.: from "mywebsite.it/myapplication/resume/hello/123?xxx" to "mywebsite.it/function/resume/hello/123?xxx"

on http.setting for "mywebsite.it/sign/*" app service there is "override back end path" configured with / but on rewrite rule i can only select default

128528-03.png

i tried without / on backend path and tried to select specific path base rule for /myapplication into rewrite rule, but rewrite didn't work and same for application(is mandatory to keep /).

Excuse me for my english, i hope that now with screenshot is more clear.

Looking forward to hearing from you
Regards





0 Votes 0 ·
01.png (15.5 KiB)

Hello @Emanuele-0211 ,

Thank you for the update.

However, I believe all of your screenshots didn't come through. For better engagement & further investigation, I would request you to send us an email as advised over the private message.

Regards,
Gita

0 Votes 0 ·

Hello @Emanuele-0211 ,

Could you please send us an email with the screenshots as advised over the private message?

Regards,
Gita

0 Votes 0 ·

Hello @Emanuele-0211 , any updates?

0 Votes 0 ·
Show more comments

0 Answers