Simple url_rewrite for base url rewrite to default location not working

I would like to redirect the user to a default location if not entering the correct full url:

Here is my example excerpt:

"version_data": {
   "not_versioned": true,
   "versions": {
     "Default": {
       "name": "Default",
       "use_extended_paths": true,
       "extended_paths": {
         "url_rewrites": [
           {
             "disabled": false,
             "path": "/myApp",
             "match_pattern": "/myApp/",
             "method": "GET",
             "rewrite_to": "/myApp/toolbox.html"
           }
         ]
       }
     }
   }
 },
 "proxy": {
   "listen_path": "/myApp",
   "target_url": "http:/ /myhost:8080/myApp",
   "strip_listen_path": true
 }

Everything works as expected for the proxy, but the configured url_rewrite seems not to take any action, no way what I try. Does anyone have a hint what might be wrong to achieve this very simple requirement?

Hi @Markus_Guenther

Welcome to the community :smiley:

For matching, the path in the URL rewrite is combined with the API’s listen_path. With the current config, requests with the URL http://localhost:8080/myApp/myApp will trigger the rewrite.

Modifying the path to empty "" should achieve the desired behaviour. Similar was discussed here, which may be useful for additional context.

Please let us know if this works for you.