I am trying to set up a react app using react router behind a uhttpd server on an embedded device. Unfortunately I do not know how to forward all subroutes (eg. /foo/bar) back to /
In nginx this is possible using the try_files statement. Is there something similar using uhttpd?
Hi I resolved this issue.
uhttpd have a option "error_page".
So we must set that option if we decide to use react.
e.g.
config uhttpd 'main'
list listen_http '0.0.0.0:80'
list listen_http '[::]:80'
option home '/www'
option error_page '/index.html'