打开Redwoodjs的绝对URL -SSR
我有一个带有几条路线的Redwoodjs应用程序。 现在是非常基本的,我使用Yarn RW Dev
启动开发服务器。
现在我创建了一些路线:
/ -> HomePage
/sign-in -> SignInPage
/register -> RegisterPage
我可以通过navigate
内部调用路由,该路由正常。但是我无法通过localhost:8910/寄存器
来调用这些路由。我遇到了404错误。
我该怎么做才能(几乎)使用它们的绝对URL直接可召唤所有路线?
I have a RedwoodJS App with several routes.
It's very basic for now and I start the development server with yarn rw dev
.
Now I have created some routes:
/ -> HomePage
/sign-in -> SignInPage
/register -> RegisterPage
I can call the routes internally via navigate
which works fine. But I cannot call these routes via localhost:8910/register
for example. I get a 404 error.
What do I have to do to make (almost) all routes callable directly with their absolute urls?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对您的问题的较晚回答,但是所有路由都在
routes.tsx
-file中管理。在我的示例中,我有一条访问bikespage
-component(位于.../pages/pages/bike/bikespage 中)的路线。 >)。
为了提出您的问题,要通过其绝对名称使它们可召唤,
name
必须与path
相同。希望这对您或后来来这里的任何人都可以帮助您!A late response to your question, but all the routes are managed in the
Routes.tsx
-file. In my example, I have a route to access theBikesPage
-component (located in.../pages/Bike/BikesPage
hence the namingBikeBikesPage
).So to ask your question, to make them callable by their absolute name, the
name
must be the same as thepath
. Hope that helped you or anyone coming here afterwards!