Reactjs 反应路由器-忽略/重定向到子文件夹

Reactjs 反应路由器-忽略/重定向到子文件夹,reactjs,.htaccess,react-router,react-router-dom,Reactjs,.htaccess,React Router,React Router Dom,是否可以忽略react路由器中的特定URL 一旦我进入react应用程序,我在一个我无法到达的街道上有一个服务台应用程序 <Route exact path="/" component={ViewHome} /> <Route path="/about" component={ViewAbout} /> <Route path="/help" // Ignore the React App and forward this reque

是否可以忽略react路由器中的特定URL

一旦我进入react应用程序,我在一个我无法到达的街道上有一个服务台应用程序

<Route
  exact
  path="/"
  component={ViewHome}
/>

<Route
  path="/about"
  component={ViewAbout}
/>

<Route
  path="/help"
  // Ignore the React App and forward this request to the server.
/>

有什么想法吗?

我不知道是否理解您的问题,但这听起来像是服务器配置问题

例如,我在服务器上使用Nginx来配置路由器。 浏览器的通常行为是在执行/操作时搜索子目录

但是,如果您以服务器不断查看索引文件的方式配置它,则应该可以

在我的Nginx配置中什么对我有效:

location / {
    try_files $uri /index.html;
}

你似乎是对的。因为Apache正在我的机器上运行,所以我必须搜索htaccess。我会更新这个问题。
location / {
    try_files $uri /index.html;
}