I have discovered that in WeWeb that for a URL to resolve when using URL paths that each path must be defined eg. example.com/search/{{path|value1}}/{{subpath|value2}}
Frustratingly the Editor permits you to change pages using missing URL paths, it has only been on publishing to staging that the web app causes the 404.
Is there anyway at all to stop WeWeb returning a 404 and actually displaying content when a URL path is not defined? I have conditional logic in place to manage this, it is just that the URL causes the 404.
Thanks @Joyce this was very helpful.
I ended up creating 3 pages named as follows:
search (root) - has no page paths
search (path) - has 1 page path
search (path and subpath) - Has 2 page paths
Then added the relevant logic and multi page sections for each page. So now each URL path resolves and I can maintain my URL structure that is already indexed in Google.