Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'URLs are generally case-sensitive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
URLs are generally case-sensitive
Authored by: hayne on Feb 28, '03 11:00:57AM

This is far from being an exceptional case. In general URLs are case
sensitive. The only part of a URL which is case insensitive is the name of
the machine - which is the part after the double slash and before the
next slash.
E.g. the URL at the top of the screen as I type this is:
http://www.macosxhints.com/comment.php?sid=200302261038110&pid=
0&type=article
The "www.macosxhints.com" is the name of the server machine and is
case insensitive. The rest of the URL is case sensitive.
And this is nothing to do with the special nature of macosxhints where
the pages are generated dynamically. It is true of all URLs - even for
static HTML pages. The reason is that the part following the machine
name in the URL is (more or less) the name of a file, so the URL will be
case sensitive if filenames are case sensitive on the server machine.
It is possible for a webmaster (e.g. with Apache) to make it so the web
server handles URLs in any case, but this is not the default and it incurs
a performance penalty so most don't do this.



[ Reply to This | # ]
URLs are generally case-sensitive
Authored by: nvdingo on Feb 28, '03 02:10:39PM

There are two ways (i think) around the case sensitivity of the entire URL
install and configure mod_speling for apache, which as the docs on the apache site say:
beginquote:
This module addresses this problem by trying to find a matching document, even after all other modules gave up. It does its work by comparing each document name in the requested directory against the requested document name without regard to case, and allowing up to one misspelling (character insertion / omission / transposition or wrong character).

end quote:

or by using an IIS server, which seems to be case insensitive, which causes me NO END OF HEADACHES when i move a site from an IIS server to my apache server. (lazy web designers.)

on a related rant, it's just *nifty* when they reference the same image from their web pages as Image.Jpg, IMAGE.JPG, image.jpg,IMage.jpg when the file is named image.jpg because they have NO SENSE OF FORMATTING

AAAAIIIIIIIIGGGGGHHHHHHHH!!!!!
thank Larry wall for my saviour `perl -p -i -e "s/find/replace/g" *`
which will find some text or RegExp and replace it with some text or output RegExp in a group of files *
end rant, thank you



[ Reply to This | # ]
URLs are generally case-sensitive
Authored by: jr_nym on Mar 03, '03 02:43:32PM

You would think that after 20 years of writing code that I would have tested (i.e., proofread) my text before publishing. Rather than saying "URLs are case insensitive" (implying that all URLs are case insensitive) I meant to write "the URL is case insensitive" (impying that only this URL is case insensitive). I discovered this fact when I accidently mis-capitalized the address to that web site before it was protected. Sorry for the confusion.



[ Reply to This | # ]