Forum Moderators: mack
Thanks.
What you will notice is when you leave a space in a file name in the adress bar on the browser well add a "%20" where the space was. Am I right in assuming you are using an html editor to build your pages? If so then your editor is ensuring that the links are pointing to the right location. ie "foo%20bar" if you where to simply place a link to foo bar then this url syntax would be illegal and would result in a 404 page not found.
It is always a good idea to give your pages and files nice simple names such as contact_us.html about_us.html or even better about.htm and contact.htm
Hope this is of some help.
Mack.
Avoid underscores too, as they visually disappear in underlined links. Google doesn't treat the separate words as being separate either.
Use either hyphens or dots. This causes the least amount of hassle with servers, browsers, search engines, and your visitors.
I've taken to using hyphens recently. I've built my site using another method though - capitals and lower case words with no gaps, eg:
ISaidHello.html
But now I realise I should have done the links like this:
i-said-hello.html
Why? Well one thing I found is that the following two filenames are identical to a browser!
ISaidHello.html
isaidhello.html
And yet you can upload both as separate files to a server! So clearly confusion occurs there.
With hyphens and lower case, I found another benefit. In Windows, it'll break the words (used below an icon on the desktop) where the hyphen occurs. Makes working with files easier.
About underscores - one reason not to use them instead of hyphens is that they require the SHIFT key to type in, whereas hyphens don't. So your visitors will thank you for that.
The webserver is the issue. Apache is case sensitive, as are most others, so This.File.html really is a different file to this.file.html but certain Windows (IIS?) servers are NOT case-sensitive.
That can cause all sorts of issues with page rank when some people link to you with differing case to what you wanted. Additionally, should you ever migrate the domain to an Apache server, all the incoming links using the "incorrect" case will suddenly appear as 404.
Recomendations: use all lower case for filenames, and separate the words with hyphens or dots (dots also do not require the shift key).
The webserver is the issue
In fact it's the underlying operating system of the server which is the issue. All Unix-type operating systems (Linux, FreeBSD, etc.) have filenames which are case-sensitive. Windows servers (even when running Apache) are not case-sensitive. The trouble comes when you develop on Windows then upload to a Unix-type server.
As most shared hosting packages are running on Linux or FreeBSD servers, not Windows, it is a very good idea to make sure to keep all your filenames lower-case just to be sure.
ISaidHello.html
isaidhello.html
In Apache Linux, this would be perfectly acceptable. I don't think it is the browser that makes the difference, but the server platform and software.
Just another 2 cents...
I guess I didn't make myself clear. When I said acceptable, I meant you can use either of these on Apache on linux. Both are considered different. A link to ISaidHello.html would go to ISaidHello.html and a link to isaidhello.html would go to isaidhello.html, both being separate documents.
Just trying to make myself clear :-)
I never really ever tried that. I always assumed that the links would be correct. I can't really test it now because I have gotten rid of all my Linux boxes. But I do remember that I had to get the case right or the browser wouldn't find the link.
In other words, a page called ThisPage.html with a link <a href=thispage.html> would result in a page not found. I remember this because I got a site that was originally on IIS4 and when I put it on Apache Linux, I had to go and change the case of all the pages because the links didn't work anymore. So I just assumed that you could have 2 links named the same but with different case and they would link correcly.
Interesting.
If you have two files on a UNIX-type server: HelloWorld.html and helloworld.html, they are completely different files. URIs are case insensitive for the domain name up to the first trailing slash, then (maybe) case-sensitive afterwards (depending on the server). So, to access each file, you would link to:
[example.com...] or
[example.com...]
It is always best to stick to lower-case only to avoid problems.