I havent messed with html in years, so I wanted to use ftp to setup my new website http://www.dc-pc.org ... there were peculiarities right away.
The server host setup before I got there, with an "index.html" in the subdirectory saying the website was under construction.

But why is it there? why did the host create the / folder? If I move index.html up a level to http://www.dc-pc.org, mozilla cant find it even tho the ftp file manager says it is there.

I created the folder to hold an explanation of the ANZI software I'm working on. but Mozilla cant find A HREF=... /program.htm no matter how I preface it unless it is in the same directory that Mozilla can find index.html; which strikes me as weird.

Dani AI

Generated

Short, practical checklist to pin down why some pages load and others do not. As suggested, the folder you see over FTP is not always the folder the webserver serves, and as discovered the server can prefer one default index filename over another. Try these targeted checks in order so you can see exactly where the mismatch is.

  1. Confirm the web root quickly: upload a uniquely named test file (for example docroot-test.html) into the folder you think is the site root and request http://yourdomain/docroot-test.html in a browser. If you get 404 while FTP shows the file, the FTP path is not your document root. Ask the host for the DocumentRoot or find it in the control panel.

  2. Make index files explicit. Put a small .htaccess in the document root containing:

    DirectoryIndex index.html index.htm

    This forces the server to accept either name as the default page. See Apache DirectoryIndex docs for details: DirectoryIndex.

  3. Check filenames and permissions. Unix servers are case-sensitive: Index.HTML is different from index.html. Ensure files are readable by the webserver (typical permissions: files 644, directories 755). Example:

    chmod 644 page.html
    chmod 755 directoryname
  4. If some links work only within a folder, verify your link syntax. A leading slash anchors to the site root; a name without a slash is relative to the current page. MDN explains relative links here: .

If troubles persist, look for rewrite rules or MultiViews/content-negotiation on the host (can change how extensions are resolved) and check the server error logs or ask the host which folder is mapped to the domain.

Recommended Answers

All 4 Replies

Hmm.. Conventionally, your document root folder (i.e. the folder that is addressed by the domain http://www.dc-pc.org) is one level underneath the folder that you have ftp access to. Usually that folder is called something like "public_html" or "htdocs"... The folder above that gives you an extra space to store things that can't (and in some cases shouldn't) be accessed directly using the HTTP protocol.

That means, on a page in your document root folder, ../ can't go anywhere...

Domain is not equal to folder... the domain ends up directed to a folder on your server, typically a few levels deep. On a unix server your actual "folder" will be something like: /home/dc-pc.org/.. but that only means anything on that server.

Thanx for the hint Matt. Part of the problem is my own dislexia, like typing dp-dc rather than dc-pc. But then part of it is the ideosyncracies of the server which you allude to. Having "index.html" stored in just looks weird to me.

Then, when I got it figured out how to redirect to /anatolia/anatolia.html and wanted to go 'home', <A HREF="/index.html" worked, but not ="index.html" or any of the varients that prefaced it like ="/".

I dunno what would happen if I put a file named "index.html" *in* a subdirectory. Be kinda nice if the server would print out a "path" statement.

I can see where the server putting "index.html" in a directory named after the website, but the redundancy looks weird. But if it found a loose "index.html" in a "public_html" there'd be no clue as to where it should be. It confused me as well because the server needed "index.html" and would not look at "index.htm".. which as a DOS user I kinda expected.

isn't neccessarily the same as ... on my server, my FTP access to my document root directory is and my domain http://www.fusiongroupuk.com/ goes into that directory. That's configured in some file somewhere on my host's server. If I was to put files in a different folder on my home directory, I wouldn't be able to see them in a browser =P

Are you saying, if you put a file called index.html in that folder, that you cannot access it from ? If that is the case, then there is something strange going on...

If you put a subdirectory into your document root (Whatever that may be called), then it is accessed as a subdirectory of the domain. For example, i have a folder called /home/fusion/public_html/testbed/... I access that from a browser as ... After the document root part, the directory structure is pretty "normal"

You could print out a path statement with some PHP or Perl... Or even some SSI-HTML... ^_-

So to recap, this is a conventional shared server setup on unix, the actual setup may differ vastly, for the most part, the only important bit is your home directory and beyond.. on a windows server, it'll be similar, but with C:\ instead of \ (server root), and maybe Documents and Settings instead of home... as long as the server sticks with a convention, you're oK:

\ (server root)
- home (accounts folder)
- - fusion (my home directory)
- - - public_html (my document root directory; accessed from my webpages as \)
- - - - testbed (accessed via )
- - (your home directory?)
- - - dc.pc.org (your document root directory?)

if things really aren't how you expect, you should talk with your hosting provider; they're usually quite helpful.

Well, the last thing I expect is help from the server people for a website that cost 30$/year. I should have expected trouble, but figured that like everything else in hardware & software, the price had fallen.

I was surprised to learn that browsers would not find index.htm, but would find index.html; taking that as a clue, I added the "l" to anatolia.htm, and then Mozilla found it. Likewise raj.htm was changed to raj.html. But what gets interesting, is if the next link is in the same directory, then the plain 3 letter suffix "htm" will do. I only need to add the final "l" if I change folders.

You know, I got a comp sci minor in 1971, and have been fooling with file systems a Loooooooong time. But since I havent tried to maintain a website in quite a while, and see "java", "rss", "css" and lotsa other acronyms that I know very little if anything about, I expected trouble. So, I wanted to avoid using all that, keep it simple, so I had some fukking clue that I knew what was going on.

I dont expect the people who work in IT can keep up either. I live in the Ozark woods, and dont expect much expertise locally. The last dialup I had, when I told the tech rep at the ISP on the phone that I used Linux, she said "What's Linux?" So I began saving up for a satellite uplink.

One of the things I'm doing at http://www.dc-pc.org is working on the functionality of text. This message, for instance, is in a box from daniweb that shows me 8 linnes.

But monitors are bigger with much better definition now than when html was first outlined. ANZI shows you two columns of 50 lines in a font that was designed at the outset to accomodate different resolutions. We are not trying to save ink on this screen.

html was setup to mimic office paper work; but we do a lotta other stuff with it, and since high speed bandwith is so much more availble, I wonder if a lotta stuff would be better posted as just screenshots of what people lay out, just as they would for a magazine offset press.

Gonzo simpler

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.