Hello @srinu P ,
I understand you have URL setup on Azure Application gateway with backend pool and needed to redirect ONLY the homepage to specific path, but all other URI paths should go to backend pool. You tried with path-based rule but it was taking /* meaning all uri's after / redirecting to that path. You also wrote a rewrite rule but it was redirecting everything again to new URI path. Your requirement is:
hostname.com/ -> hostname.com/ecom/spid/
hostname.com/[anything] -> backend pool
I discussed this with the Azure Application gateway Product Group team and below is their response:
This isn’t possible via redirect rules out of box, but can be possible via workaround (albeit a bit inefficient, but possible).
1) Create a new rewrite rule to change any request for “/” to be rewritten with a placeholder path and have the path-map reevaluated.
2) Create a redirect rule for the fictitious path to redirect to the proper path via external website reference.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.