How are you hosting these static files?

My guess is that the usual suspects in terms of static file serving in
pure node---ie, express static, hapi static and ecstatic, do not have
built-in support for this kind of thing (I can confirm this in the
case of ecstatic). If you really really need this you might be able to
hack it in by adding functionality that somehow does lookups against
filename.toLowerCase() versions of whatever you're looking for, but
this is likely non-trivial.

Another option, if you're hosting static files with nginx (a good idea
for production) is to see if nginx has support for this (my guess is
not).

Like has already been suggested, symlinks should work on a
case-sensitive filesystem such as what you'd see on linux, but will
cause a world of hurt on case-insensitive filesystems like with osx.

Honestly, the easiest thing for you is to probably decide this
behavior isn't crucial and leave it be. Note that this is different
from "you don't want this," rather what I'm saying is more, "you
probably don't want this *bad enough* to go through the trouble." :)

--Josh

On Sun, May 31, 2015 at 4:59 PM, Ryan Graham <[email protected]> wrote:
> A symlink for this won't work out well if you do development on Mac and/or
> Windows, since they default to using case-insensitive/case-folding
> filesystems. This gets doubly annoying if you are using git, since it is
> case-sensitive, even if the underlying filesystem is not.
>
> ~Ryan
>
> On Sun, 31 May 2015 at 13:51 Eiríkur <[email protected]> wrote:
>>
>> This is a good use case for a symbolic link in the file system.
>>
>> On Saturday, May 30, 2015 at 5:42:16 PM UTC-4, dan krutz wrote:
>>>
>>> I have a plain old html file within a static directory running under
>>> public. When a user hits server.com/caa/ I'd like to serve up the static
>>> html page. However, if they user also goes to server.com/CAA/ I'd like them
>>> to go to the same directory, so case sensitivity should not matter. Right
>>> now, when the user enters in a capital "CAA" they visit a different folder
>>> than a lowercase "caa" ... I'd like this not to be the case.
>>>
>>> Can anyone tell me where I can fix this inside node? I am a node newbie.
>>>
>>> Thanks all.
>>
>> --
>> Job board: http://jobs.nodejs.org/
>> New group rules:
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/nodejs/f25dadff-0550-4b01-83ca-7952786be33e%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/CAGjmZGw1eFcoiYLXAdynytckOEkE3YkcTD1Zk%2B8OG_v2Cyiitw%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHL2YmrM8if%2Bdvt6Jv2FoYE0DV6%3DKDnqKSEsGde7%3DpxboDo91g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to