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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNIX case sensitive file names

Status
Not open for further replies.

rtowne

Technical User
Aug 25, 2000
2
US
Is there a way to turn off case sensitivity on Sun Solaris? Our website currently contains URL's with directory names in uppercase and filenames in lowercase and we are getting a lot of complaints from the public on this and would like to be able to correct this without changing 10,000+ documents. [sig][/sig]
 
Might there be a way to change this in your web server? So that paths and files are *presented* in a case insensitive manner to a web user.. [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>Making mistakes, so you don't have to. &lt;grin&gt;[/sig]
 
We us IPlanet Web server on a Sun Solaris platform. I have researched IPlanet/Netscape and have not found anything yet relating to case insensitive solutions. [sig][/sig]
 
I doubt there is a way to directly &quot;turn off&quot; case sensitivity in any Unix, but a workaround shouldn't be too hard. I'm not familiar directly with iPlanet, but I think way to do this is to read the REQUEST_URI and convert it to lowercase if necessary.

To elaborate, every webserver (AFAIK) has a standard Error 404 redirect (File Not Found). Generally it is pretty easy to customize the html page that appears when the browser requests a nonexistent URL. Thus you use server-side scripting on this page, which reads the REQUEST_URI variable from the browser and checks it against the closest match on server's filesystem, then redirects the browser to the correct URL. The only danger here is if two URLS exist on the server with the same name, but different case, such as and but that's probably unlikely. [sig][/sig]
 
You can't turn off the case sensitivity. It's part of Unix, so you're stuck with it, I'm afraid.

If this situation has been created by the users uploading these documents, then they've created their own problem. The HTTP spec also specifies case sensitivity. If the users have decided to ignore this and generate their documents on an OS that appears to be case-sensitive, but isn't (go on, take 3 guesses as to which one I'm talking about...), and then they find that their case-sensitive links don't work, then that's their fault...

(I spent a few hours this weekend helping a friend to fix his website when he found it didn't work after he uploaded his documents to the server. The problem? His HTML editor had inserted all document links in mixed case, but the documents he had been linking to were in a mixture of lower case, upper case, and &quot;sentence case&quot;. A couple of hours using vi and perl soon sorted that out.)

I believe that there is a module for the Apache web server that will deal with this. It removes case-sensitivity from all HTTP requests and serves documents in the same way. However, I don't think that you can do this using iPlanet. [sig]<p> Andy Bold<br><a href=mailto: > </a><br><a href= > </a><br>"I've probably made most of the mistakes already, so hopefully you won't have to..." Me, most days.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top