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:
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
Redirect permanent http://Wibble.com
to catch accesses to this name when used with any other use of capital and lower case letters and redirect them to
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:
# ServerAlias can be used to cover www.beatleshist.tld, etc.
Redirect permanent / http://BeatlesHits.tld/