I understand you are trying to set-up a Redirect using Azure FrontDoor where you want rewrite the url_path /abcd/efg/?queryk=queryvalue#anchor
to /abcd/efg?queryk=queryvalue#anchor
without the / after efg and before ?queryk
In order to achieve the URL rewrite you can try setting the rule-set for the Request path as shown below
I tried it on my end and can see the trailing slash was removed.
Hope this helps! Please let me know if you have any questions. Thank you!
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.