You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Timothy Stone <ci...@petmystone.com> on 2004/03/26 16:06:29 UTC

[users@httpd] File extension matching behavior, help

List,

I've encountered something that has got me confused.

I'm running Apache 2.0.48 on Windows 2000.

I just realized my source code for some pages were calling images with a 
  lowercase extension when the resource was explicitly uppercase:

   source: foo.jpg

resource: foo.JPG

I have also just noted that my installation of Apache is also serving 
resources with arbitarily camel-cased resources as an experiment.

Is this something about Apache on Windoze I need to know about that I 
missed?

Many thanks,
Tim

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] File extension matching behavior, help

Posted by Timothy Stone <ci...@petmystone.com>.
Joshua Slive wrote:

> On Fri, 26 Mar 2004, Timothy Stone wrote:
> 
>>I'm running Apache 2.0.48 on Windows 2000.
>>
>>I just realized my source code for some pages were calling images with a
>>  lowercase extension when the resource was explicitly uppercase:
>>
>>   source: foo.jpg
>>
>>resource: foo.JPG
>>
>>I have also just noted that my installation of Apache is also serving
>>resources with arbitarily camel-cased resources as an experiment.
>>
>>Is this something about Apache on Windoze I need to know about that I
>>missed?
> 
> 
> The windows filesystem is case-insensitive, so apache on windows will
> access files without respect to case.
> 
> Of course, you should always try to be uniform about your treatment of
> case, since URLs on the web are in general case-sensitive, and if you mix
> things up you could get duplicates in search engines, caches, etc.
> 
> Joshua.
> 

Thanks Joshua,

I inherited this site. I do know better, but since I'm personally very 
good about naming conventions and the like, I never encountered before, 
or I should say I never noticed it.

My staging server is Linux so I noticed it right away. First, cursed the 
students that shipped the code and then cursed the instructor for not 
doing code reviews or teaching the basics of code maintenance.

Tim

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] File extension matching behavior, help

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 26 Mar 2004, Timothy Stone wrote:
> I'm running Apache 2.0.48 on Windows 2000.
>
> I just realized my source code for some pages were calling images with a
>   lowercase extension when the resource was explicitly uppercase:
>
>    source: foo.jpg
>
> resource: foo.JPG
>
> I have also just noted that my installation of Apache is also serving
> resources with arbitarily camel-cased resources as an experiment.
>
> Is this something about Apache on Windoze I need to know about that I
> missed?

The windows filesystem is case-insensitive, so apache on windows will
access files without respect to case.

Of course, you should always try to be uniform about your treatment of
case, since URLs on the web are in general case-sensitive, and if you mix
things up you could get duplicates in search engines, caches, etc.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] File extension matching behavior, help

Posted by Aaron W Morris <aa...@mindspring.com>.
Timothy Stone wrote:

> List,
> 
> I've encountered something that has got me confused.
> 
> I'm running Apache 2.0.48 on Windows 2000.
> 
> I just realized my source code for some pages were calling images with a 
>  lowercase extension when the resource was explicitly uppercase:
> 
>   source: foo.jpg
> 
> resource: foo.JPG
> 
> I have also just noted that my installation of Apache is also serving 
> resources with arbitarily camel-cased resources as an experiment.
> 
> Is this something about Apache on Windoze I need to know about that I 
> missed?
> 
> Many thanks,
> Tim

I think mod_speling will help with your problem.


-- 
Aaron W Morris <aa...@mindspring.com> (decep)



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org