redwood: [Bug?]: 404 on paths containing periods

What’s not working?

We’re seeing 404s instead of index.html for paths containing periods, e.g. https://example.com/foo/bar.baz. Our app has profile handles that can include periods and that are used directly in urls like this.

I’m investigating whether we have any way to override this, so if there’s a known workaround, that would be great to hear. This is a live production issue for us right now.

We’re also seeing evidence that reverting to Redwood 6.5.1 or so might work as a temporary solution.

How do we reproduce the bug?

Create a new redwood app and generate a page:

yarn create redwood-app periods-break-urls --typescript
cd periods-break-urls
yarn rw g page Test

Update web/src/Routes.tsx so the path contains a period:

-      <Route path="/test" page={TestPage} name="test" />
+      <Route path="/test.profile" page={TestPage} name="test" />

Run the app:

yarn rw dev

or if you prefer

yarn rw build && yarn rw serve

Visit http://localhost:8910/test.profile

Expected result: Test page renders Actual result: 404 Not Found

What’s your environment? (If it applies)

Redwood 6.6.4

Are you interested in working on this?

  • I’m interested in working on this

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 1
  • Comments: 17 (17 by maintainers)

Most upvoted comments

I’ll take a look at this tomorrow. I haven’t been following along, so first I will have to get up to speed on things. Then I’ll let you know how we’ll handle this

@Tobbe I’m happy to report that the v7.0.7 release appears to resolve the paths-with-periods issue (outside of the dev server). 🎉

I understand that the issue persists with yarn rw dev because of a vite bug, and we can live with that.

Thanks for the resolution!

This seems like a rather significant breaking change for a minor.

Yeah, this was/is not how we’d label this had we realized this would be the effect. Redwood definitely needs to support dots in the url path, just like you have it. I’ll have to do a deeper dive to figure out exactly how to fix this, but it should definitely be fixed somehow.

So next step here is for me to get a reproduction up locally (thanks for providing the steps on how to do so!) and then start looking into a solution. I’ll try to get to it tomorrow (Monday) or early Tuesday. After that I’ll be traveling.