RE: [users@httpd] make URL's case insensitive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Boyle Owen <Owen.Boyle@xxxxxxx>:

> > -----Original Message-----
> > From: Nick Kew [mailto:nick@xxxxxxxxxxxx]
> > 
> > It is HTTP, the protocol of the Web, that is case-sensitive.
> > Anything that tries to pretend it's not is broken.
> 
> Exactly.
> 
> The whole concept of "case-sensitivity" is wrong-headed to begin with. The
> case of a letter is an essential part of its semantics and cannot be
> dispensed with without losing information. 
> 
> To give an example, the other night, I was in a restaurant and one of the
> items on the menu was "Filets de perche d'Orange". In a case-insensitive
> world, you might expect your fish to come with orange sauce. But there was
> important information in the capital "O" in "Orange"... As it turns out the
> restaurant was called the "Hotel D'Orange" and so the menu was telling us
> that the dish was done in the special style of that hotel (garlic butter,
> actually). So the case of a single letter changed completely the semantics of
> the phrase and the taste of the fish.
> 
> Filenames and URLs are meant for human consumption and so reflect the
> underlying semantics of human language (otherwise we'd just use inodes and IP
> addresses). So if case is important in our written language it must be
> important on a computer too.

Hmmm, didn't consider this...(gah!)

On a different note, Joshua gave me the following use of mod_rewrite to make 
URL's all lower case:

Well, you just changed your question.  Mapping to all-lowercase is
actually possible, as opposed to general case-insensitivity which is
not possible (and, in addition, not advisable, since proxy caches,
search engines, etc are all case sensitive).

Something like:

RewriteEngine On
RewriteMap lc int:tolower
RewriteRule (.*) ${lc:$1} [R]

(The [R] on the end is not strictly necessary, but is highly
recommended unless you want many variants of your URLs to propogate to
search engines and caches.)

However, when I try this in apache (2.0.5x), I get the following message 
returned to me in firefox 1.0.7:

redirection limit for this URL exceeded, unable to load requested page

It would appear that a infinite rewrite could be happening, but I'm not quite 
sure as to how to solve the problem.

Bill



---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux