Rewrite rule from "/*" to "/index.html" does not work for arbitrary .html files

Dear communitity,

just started with render.com and deployed a single static “/index.html” via github.

Direct access to /index.html on my custom domain works as expected.

Added a generic rewrite rule from “/*” to “/index.html” as explained in the docs.

Now only URLs ending with “.html” are NOT handled correctly:
https://eth-link.com/unknown.html

Any idea?

Hi @berlincode,

I believe the issue here might be that the underlying client side routing is looking specifically for a file with the extension unknown.html. When I go to https://eth-link.com/unknown it routes to index.html (which is the expected behavior). Which routing framework are you using?

Hi Tyler,

thanks for your reply.

If you access https://eth-link.com/unknown.html you will get a 404 from render.com. So it could not be a routing problem inside my ‘index.html’, because it is not loaded at all.

It would be perfect, if you can have another look at it.

Thanks in advance.

Anyone?

So, just to summarize the problem:

I have a wildcard rewrite rule, but I receive a 404 file not found error for all URLs where the file part ends with “.html” or “.htm”

Can somebody please acknowlege, that this problem exists.

Thank you.

More than 1 month passed.

Can someone please acknowlegde that the problem exists?

More than 1 month passed.

Can someone please acknowlegde that the problem exists?

[Discourse post]

Hi there,

Our apologies for the delayed response. For an internal rewrite, I believe we return a 404 for file paths that are not found because if someone has a bad link to a non-existent file (say /bad-link.html) but also has a rewrite rule they’d never get a 404 for the bad link. My apologies that our docs do not make this more clear. I am not sure of a workaround for this yet but I will try to track one down.