Forum Moderators: phranque

Message Too Old, No Replies

Case Sensitive URLs

         

Angelina

7:24 am on Oct 29, 2009 (gmt 0)

10+ Year Member



Hi Guys--Please give your inputs:

I have a site www.example.com wherein the page http://www.example.com/welcome.html does not open but the page http://www.example.com/Welcome.html opens....why?

Thanks in Advance

[edited by: phranque at 1:51 pm (utc) on Oct. 29, 2009]
[edit reason] exemplified domains [/edit]

phranque

1:48 pm on Oct 29, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the scheme and hostname is case-insensitive.
the path, file name, query string and fragment identifier are all case-sensitive.
you should name all your files and directories with lowercase and no spaces.

maximillianos

2:02 pm on Oct 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Agree with phranque. I made this mistake 10 years ago (using mixed case) and paid for it in broken links over the years until I finally realized it was a problem and built-in some re-direct rules to fix it.

piatkow

2:13 pm on Oct 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I got caught with the very first site I ever built and didn't ensure that the case in the links matched the file names. Worked fine when I tested it on Windows and couldn't understand why it was failing after I uploaded it. Maybe I should have taken it as a warning and abandoned the frame based design then, it took me several weeks to learn better.

D_Blackwell

3:20 pm on Oct 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And if you need to break up directory name or file name to make the URI easier to follow, do so with a hyphen. Underscores are pretty common, but you can't see them in a link. Hyphens are obvious.

www.example.com/easy-read/easy-read.html

Angelina

4:54 am on Oct 30, 2009 (gmt 0)

10+ Year Member



If this is the case that
the scheme and hostname is case-insensitive.
the path, file name, query string and fragment identifier are all case-sensitive. , then why is

http://www.example.co.uk/properties/propertylist.php

opening and this http://www.example.co.uk/properties/Propertylist.php also opening fine?

[edited by: bill at 7:38 am (utc) on Oct. 30, 2009]
[edit reason] No URLs or links to personal sites. Use example.com [/edit]

D_Blackwell

5:46 am on Oct 30, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like a question for a server expert. I just replaced a page with a copy where I put the first letter uppercase and got the expected 404. Put the original page back up, and back in business.

geekay

7:25 am on Oct 30, 2009 (gmt 0)

10+ Year Member



To satisfy my curiosity: Could there be two separate files with different names on this server, propertylist.php and Propertylist.php, with identical contents? Or a mod_rewrite?
But, is it necessary for Angelina to post real URL:s here, twice? I support the WebmasterWorld custom.