0

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?

Jonathan R
  • 3,652
  • 3
  • 22
  • 40

1 Answers1

2

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'
Seiji
  • 36
  • 1