Recently had to setup a quick Azure Web App Service to complete multiple domain re-directs, we chose to use this as it would provide custom domains with AutoSSL certificates as we phase out these domains.
We ran into a problem that historical full URL’s (after the trailing slash) after the ‘/’ were not being recognised by the Azure Web App.
Custom Domain
donkey.com
If we visit donkey.com the Azure web-service responds, however if we visit donkey.com/URL, the URL we want to re-direct we receive an error message indicating the NGINX is not responding and forwarding to the index page.

We found multiple articles (see References below) however these did not work for us in January 2025. We believe its a combination of current Linux App Plan and PHP8.3.
We need to modify the nginx default configuration with the following adjustment;
location / {
try_files $uri $uri/ /index.html;
REF: https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files
References
https://www.blimped.nl/fixing-nginx-trailing-slash-issue-on-azure-linux-web-apps