How do you create a route that starts with a dot in Remix?

Viewed 194

I just started using Remix.run and I'm trying to add a ssl certificate to my site and it requires that I make this specific path available in my app that's similar to this www.mypage.com/.well-known/pki-validation/blah.txt

Unfortunately, I find that when i create a route folder in Remix that starts with a dot, it returns a 404 response. Even when i try to escape it in the name like so [.]well-known

https://remix.run/docs/en/v1/guides/resource-routes#url-escaping

Example of what I've tried.

app/
├── routes/
│   ├── [.]well-known/
│   │   ├── pki-validation
│   │   ├────── blah[.]txt.tsx
│   └── about.tsx
│   └── index.tsx
└── root.tsx

Any ideas? Thanks.

1 Answers

I think you are supposed to wrap more between those brackets.

app/
├── routes/
│   ├── [.well-known]/
│   │   ├── pki-validation
│   │   ├────── [blah.txt].tsx
│   └── about.tsx
│   └── index.tsx
└── root.tsx

Think i got something working here: https://stackblitz.com/edit/node-wmuju8

Edit: seems like escaping the dot in the wellknown folder and file is enough, so not sure why it is not working for you.

Related