You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I registered a route path about-detail.
when I open localhost:8080/screen/about/pages/index/index.html, and navigateTo /about-detail, I want route to localhost:8080/screen/about/pages/about-detail/index.html. and It worked!
but if I refresh the page, it seems use routes base localhost:8080/index, not base localhost:8080/screen/about/pages/index.
I understand react-router may don't know what the base url there is , so I think is there any config options that can correct the base html file ?
I have tried the <BrowserRouter basename="">, still not work.
with dev env, I already set webpack-dev-server config with : historyApiFallback:true and webpack output public:'/'.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have many child pages, the pages tree likes :
list as :
I registered a route path
about-detail
.when I open
localhost:8080/screen/about/pages/index/index.html
, and navigateTo/about-detail
, I want route tolocalhost:8080/screen/about/pages/about-detail/index.html
. and It worked!but if I refresh the page, it seems use routes base
localhost:8080/index
, not baselocalhost:8080/screen/about/pages/index
.I understand react-router may don't know what the
base url
there is , so I think is there any config options that can correct thebase html file
?I have tried the
<BrowserRouter basename="">
, still not work.with dev env, I already set webpack-dev-server config with :
historyApiFallback:true
and webpack outputpublic:'/'
.Beta Was this translation helpful? Give feedback.
All reactions