Redirecting a URI that is entered with either uppercase or lowercase letters to the same URL resource
 Technote (troubleshooting)
 
Problem(Abstract)
When the requested URI=/TEst fails with a 404.
 
Cause
Aliases and redirects in the IBM® HTTP Server are case sensitive and therefore if a user accidentally enters for example, http://www.mycompany.com/TEst and you have an alias or redirect defined as /test, the requested URI=/TEst will fail with a 404.
 
Resolving the problem
This type of problem can be corrected by using a regular expression.
For example:

RedirectMatch /[Tt][Ee][Ss][Tt]$ http://www.mycompany.com/index.htm

In the preceding example all requests, such as:

http://www.mycompany.com/test
http://www.mycompany.com/TEst
http://www.mycompany.com/teST

and others, would be redirected to http://www.mycompany.com/index.htm.

AliasMatch ^/[Tt][Ee][Ss][Tt](.*) "C:/IBM HTTP Server/test$1"

In the preceding example, requests similar to:

http://www.mycompany.com/test/mystuff.htm
http://www.mycompany.com/TEst/index.htm
http://www.mycompany.com/teST/go.html

and others, would allow the requested file to be served from the C:/IBM HTTP Server/test directory.
 
Related information
RedirectMatch directive
Module mod_alias
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > IBM HTTP Server > Modules
Operating system(s): Windows
Software version: 6.0
Software edition:
Reference #: 1115051
IBM Group: Software Group
Modified date: Sep 15, 2004