I tried to repo your environment and the redirection works as expected for me.
Direct access backend:
App gateway access:
Also, the Access Logs:
- This indicates the Rewrites are happening successfully.
- Please check your configuration once again.
Please note that the browser URL will not change.
The external users will be oblivious to the URL Path rewrites done by App gateway and will continue to see the URL Path they provided in the request.