Doomed Apache patch
for case sensitive domain name

N.B.: The following patch must not be used because Windows Internet Explorer browsers have a nasty bug. The bug is this: The server returns a redirect response to the browser, telling it to try again with a name that differs only in that some letters have been switched between lower and upper case. The browser says, "Hah! I know that name already. I got it writted on a piece of paper. I'll send it again just like da last toim." (i.e. without changing the case of any letters) Of course, the result is an unwitting denial of service attack on the poor web server. And there's nothing we can do about it because millions of these bad browsers will continue to be in use for years and years to come. ;-(

This page is best understood after reading my Apache Redirect page.

The following is a simulation of what Apache might be like if it were enhanced as I would like. Apache as of 1.3.9 does not have the features you see below.

I would like to propose the following enhancements to Apache's NameVirtualHost functionality. First a new core documentation entry:

ServerNameCaseSensitive directive

Syntax: ServerNameCaseSensitive fully-qualified domain name
Context: server config, name-based virtual host
Status: core

The ServerNameCaseSensitive directive, like the ServerName directive, sets the hostname of the server. This is only useful inside a name-based <VirtualHost> along with redirection URLs. For example:


would be be the first of two or more <VirtualHost> directives. A subsequent one would include

Serveralias *
Redirect permanent

to catch accesses to this name when used with any other use of capital and lower case letters and redirect them to

See Also:
Apache Name-based Virtual Hosts documentation

And an addition to the Apache name-based Virtual Host Support doc page:

For example, suppose you want everyone to see your domain as BeatlesHits.tld (with exactly these capital letters and without "www."). Then you simply add to one of the Apache configuration files (most likely httpd.conf or srm.conf) code similar to the following:


ServerNameCaseSensitive BeatlesHits.tld
DocumentRoot /www/BeatlesHits

ServerName beatleshits.tld
# ServerAlias
can be used to cover www.beatleshist.tld, etc.
ServerAlias *
Redirect permanent / http://BeatlesHits.tld/

WARNING: do not use this patch. See above.
I provide a context-diff patch file for the required changes to Apache 1.3.9. - this page
1999-11-11 Created