Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to make Firebase hosting non-case-sensitive?

I am using Firebase hosting, and I am wondering if there is a way to make the links on my Firebase-hosted site case-insensitive? Many people may be typing them directly into their browser instead of following links. (Don't ask...I realize that's ridiculous, but it's a totally different conversation.)

I ran firebase -help but don't see a configuration option for it, nor do I see that option on the Hosting tab on Forge.

If there is no option for case-insensitive hosting, is there any way to accomplish this on a file system that is case-insensitive? I can't create lower- or mixed-case versions of the folders, because my file system sees them as the same name.

like image 429
Andy Jobe Avatar asked May 20 '15 15:05

Andy Jobe


People also ask

Are databases case sensitive?

Database case-sensitivity considerations for when specifying the select query. Most databases treat table column names as case-insensitive. However, some databases, for example Sybase, treat table column names as case-sensitive.


2 Answers

Firebase redirects use glob pattern matching, so you could do something like this:

{
   "source" : "/[Ff][Oo][Oo]",
   "destination" : "/Foo",
   "type" : 301
}
like image 146
mjleitch Avatar answered Oct 05 '22 13:10

mjleitch


Firebase hosting is case-sensitive. It doesn't have an option to work non-case-sensitive.

Your best bet is to fix the problem at the source and ensure all your files are named consistently. This question on SuperUser might be of help there: https://superuser.com/questions/599955/make-every-file-in-a-directory-structure-lowercase-windows

like image 30
Frank van Puffelen Avatar answered Oct 05 '22 13:10

Frank van Puffelen