PDA

View Full Version : htm html uppercase lowercase?


multifunctional
12-13-2000, 05:10 PM
What is the easiest way to accomodate a web site visitor regardless of whether or not they use upper or lower case in the URL or if they type in .htm versus .html? Anyone have any links that discuss the issue?[nbsp][nbsp]

Thanks!!
David@co-author.com

dank
12-13-2000, 05:24 PM
URLs are non-case sensitive, so www.MyDomain.com (http://www.MyDomain.com) is the same as www.mydomain.com (http://www.mydomain.com) (nice for making domain names easier to distinguish visually, such as in print).[nbsp][nbsp]Directories and file names/extensions, however, are very much case sensitive.[nbsp][nbsp]I suppose you could set up capitalized and non-capitalized versions of everything, but that would quickly become a nightmare.

Your best bet is to do everything lower case unless you have a really good reason to do otherwise, as that's the way the majority of people will type it, regardless.[nbsp][nbsp]Beyond that, set up a custom 404 page to at least greet people with a friendly error and navigation if they do type it wrong.

Dan

Jeff
12-14-2000, 05:46 PM
I personally had this problem as I moved here from an NT server.[nbsp][nbsp]The solution which worked quite well for me was to create symbolic links for the main categories.

ln -s places Places
ln -s news News
etc., etc.

It only takes a few minutes to cover the major ones, and as Dan says, the custom 404 will take care of the minor ones.[nbsp][nbsp]You could also issue 301's for the known offenders in the .htaccess file which would help search engines index the new directory names

Redirect permanent /Dir http://yoururl.com/dir/
or Redirect permanent /Dir /dir

but I prefer the seamless symlinks.

I also remember reading at one time that someone had a custom php error page which somehow took was was typed and supplied a redirect to the correct no-caps version...
[This message has been edited by Jeff (edited 12-14-00@5:47 pm)]