Directories & webDAV


#1

I just transferred my domain, lorinroche.com, to DreamHost and enabled webDAV for a username. DAV works perfectly - I hit command-K from the desktop, and the server mounts almost instantly.

But I have done something wrong in setting up the directory structure. If you type lorinroche.com, you see a directory listing, not my home page. And if I just put an index.html page at the next higher directory, it shows up, but with broken links.

index of /
Name Last modified Size Description
Parent Directory 16-Apr-2004 16:03 -
anahata/ 16-Apr-2004 15:08 -
im/ 15-Apr-2004 13:28 -
lorinroche.com/ 15-Apr-2004 15:44 -
web-data/ 15-Apr-2004 15:47 -
web-settings/ 15-Apr-2004 15:47 -

can anyone see what I am doing wrong here? I can, by the way, just erase the files and start over again. But there is something very simple I am not seeing.


#2

Your index.html depends on the images being in the same directory. You just need to move everything in lorinroche.com to the parent directory, not just the index.html file.

The images are referencing just the image filename, which is a form of a relative URL, where in this case the image file is supposed to be in the same directory as the HTML file. Perhaps your software can be configured to use absolute URLs instead, like it does for all the links.

As for directory structure, on the DH filesystem, each shell/FTP user gets a home directory, at /home/username

Domains and subdomains get directories named after them as subdirectories within your home directory, ie /home/username/domain

URI are format: scheme://host/path/file

So usually to find the file, you replace the scheme://host componenets with the document root, ie

http://www.yourdomain.com/index.html -> /home/username/yourdomain.com/index.html

:cool: Perl / MySQL / HTML CSS


#3

Thanks, Atropos. I am meditating on the koan you gave me.

I just moved everything up, so all files are at the same level (in anahata) It’s simpler, but not working yet. Amazing how confused I am over the simplest thing.

Is there any difference in using webDAV?


#4

It was too simple to see. The webDAV was working great. The problem was that I had just started using GoLive that day - having avoided it for the last 5 years because it looked weird to me. I preferred to hand-code my pages, writing my own HTML and tweaking CSS, then manually uploading each page. I used GL to vacuum up my whole site at the old server, but it imposed a file structure I wasn’t used to.

So I deleted everything, then re-uploaded the site with a flat file structure, and it seems to all be working - I opened the site with Mozilla, IE and Safari and it looks fine.


#5

If you want to get better-organized (dumping everything in the same directory is messy), you can put images in a subdirectory as long as you reference them correctly, like IMG SRC=“subdir/image.gif”.

– Dan