Is there a way to make Firebase hosting case insensitive?

I use Firebase hosting, and I wonder if there is a way to make case-sensitive links on my Firebase site? Many people can enter them directly into their browser, and not through links. (Donโ€™t ask ... I understand that this is ridiculous, but this is a completely different conversation.)

I started firebase -help, but I donโ€™t see the configuration parameter for it, and I donโ€™t see this option on the Hosting tab in Forge.

If there is no way for case-insensitive hosting, is there a way to do this on a file system that is case-insensitive? I cannot create versions of folders with lower or mixed case, because my file system considers them the same.

+4
source share
3 answers

I just found that there is a way to add redirects using firebase hosting (details here: https://www.firebase.com/docs/hosting/guide/url-redirects-rewrites.html ) and I can use this effectively. to solve 99% of this problem.

I added the redirect as follows:

{
   "source" : "/foo",
   "destination" : "/Foo",
   "type" : 301
}

That way, if someone types in lowercase, they get 301'd for the correct link. It works like a charm!

+2
source

The Firebase redirect uses glob pattern matching , so you can do something like this:

{
   "source" : "/[Ff][Oo][Oo]",
   "destination" : "/Foo",
   "type" : 301
}
+2
source

Firebase . .

It is best to fix the problem at the source and ensure that all your files are named sequentially. This question about SuperUser might help: https://superuser.com/questions/599955/make-every-file-in-a-directory-structure-lowercase-windows

0
source

Source: https://habr.com/ru/post/1589046/


All Articles