Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignoring case in URLs

Status
Not open for further replies.

burritonator

IS-IT--Management
Jun 15, 2004
133
US
We are in the process of migrating our hosted websites to new servers, and I've run into one seemingly simple issue that I haven't been able to find a solution to.

Our old web servers don't seem to care whether the characters in the URLs are upper or lower case. For instance, if there is a directory and file on the server called "somesite.com/index.html", then entering the URL " " or any other combination of upper/lower case characters will cause the site to load as long as the spelling is correct.

Our new servers, however, are case-sensitive in this regard. Using the above example, the URL " will cause a 404 error since the actual directory and filename on the server is not upper-case.

How can I configure the new server so that it will also ignore case in URLs? I thought it would probably be a setting in the httpd.conf file, but I haven't been able to find it yet.

Thanks
 
Are your old web servers and your new web servers running the same OS and filesystem?

Were your old servers running mod_speling?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
The old and new servers are Macs running OSX. If the old servers were running mod_speling, I couldn't find any reference to it. To make sure I didn't overlook anything, how could I tell for sure?

Thanks
 
I just found something that would seem to indicate that the old servers definitely were not using mod_speling. In the httpd.conf file, this line appears but it is commented out:

#LoadModule speling_module libexec/httpd/mod_speling.so

I also have been unable to find the command "CheckSpelling On" anywhere in the configuration.

What else could be causing the old servers to ignore the case in URLs?

Thanks
 
The line "#AddModule mod_speling.c" is also commented out in httpd.conf on the old servers, so it looks like some other method was used to tell the server to ignore case in URLs. Any ideas?

Thanks
 
I apologize for adding another post so soon, but I thought of something else that I forgot to mention before and I wanted to make sure that I provide as much relevant information as possible.

The ignoring of upper/lower case on the old servers does not only involve URLs typed by a user into the address line of their web browser, but also extends to URLs that are coded into the HTML files for various websites. For instance, the designers of the some of the sites actually used different case for references to directories and filenames within the HTML files than what appears in the filenames themselves. (For instance, the URL " might appear in an HTML file when the actual directory and filename are all lower case.) The old servers don't mind, but the new servers can't find the files in these cases. I just wanted to mention this in case it makes a difference.

Thanks
 
burritonator:

As sleipnir214 mentioned, are the filesystems different between the two servers? Some filesystems are case sensitive. You did not answer that above.

If the new filesystem is indeed case sensitive then it is possible to use either .htaccess or change httpd.conf to rewrite the URLs to lowercase. This of course assumes that all the files on the new server are lowercase.
 
From HTML specification:
URLs in general are case-sensitive (with the exception of machine names). There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.
So HTML contents with case-insensitive URLs is incorrect (sooner or later you will have troubles with it).
May be it's not a very hard task to convert these HTML files with bulk text substitution...
 
The issue did indeed turn out to be with the filesystems themselves. I had originally thought that the old servers were probably using some setting within the httpd.conf file to ignore case-sensitivity, but after double-checking the old servers, I discovered that their filesystem was indeed case-insensitive, whereas the filesystem on the new servers is case-sensitive.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top