Jump to content


Photo

Where Do I Put My Files?


  • Please log in to reply
29 replies to this topic

#1 Deverill

Deverill

    Immediate Family

  • Members
  • PipPipPipPip
  • 3,307 posts

Posted 07 November 2003 - 06:50 PM

A forum reader asked me in email:

Problem: I can't seem to find out how I need to change my paths in the html code.  I believe I need to load everything to public and all pictures and animations to images folder. If that is true I'm not sure how to change the path in my code to reflect the images folder.


Here's what I replied (slightly edited):

The locations of various website files is entirely up to you except the entire site must live under the public_html folder. If you choose to use an images folder then you are free to do so... many web designers do that to keep their sites neat and tidy. Here's a simple example to do it this way:

<HTML>
<HEAD>
<TITLE> test page </TITLE>
</HEAD>
<BODY>
Here's my picture of my dog Toto.<br>
<img src="/images/toto.gif">
</BODY>
</HTML>

Assume this file above is called index.htm you put it under /public_html when you upload it and you put the toto.gif file under /public_html/images folder. When someone goes to your site they will see the sentence "Here's my picture of my dog Toto." and your little dog Toto's picture. If you wanted to dump all of the files into one folder (I'd recommend against it) you would replace the next-to-last line with:
<img src="toto.gif">

The file path you put after src= would be in relation to the htm file being edited.

I have a church site with many folders - one for ministries, one for images, one for mission trips, etc. In all of my sites I try to remain consistent. I have folders for images, styles which include CSS stylesheets, Templates which are where my Dreamweaver templates are, and major categories if the site is going to be very large.

Hope this helps - if you have any questions just post to the forums in the appropriate category. Family members are standing by to answer your questions. :dance: Seriously, there are a lot of smart folks here and they love to help out!

Edited by Deverill, 07 November 2003 - 06:50 PM.

"A winner is simply willing to do what a loser won't."

#2 seaheather

seaheather

    New To The Neighborhood

  • Members
  • Pip
  • 6 posts

Posted 20 November 2003 - 03:33 PM

Hello, I am a new member of the family (as of today). I am attempting to prepare my website so it will be up and running when the transfer of my domain is complete.

I have put my index file in the public_html folder, and my images in the images folder. When I look at the page, the images do not load. I edited the html so that the entire path is shown, starting with "http://", and then the page loads as intended. What am I doing wrong? I don't want to have to edit the path of all my pictures every time I work on my page offline and want to upload it again.

Thanks for any help you can offer!

Karen

#3 TCH-Andy

TCH-Andy

    Immediate Family

  • Members
  • PipPipPipPip
  • 4,699 posts

Posted 20 November 2003 - 04:03 PM

Hi Karen,

:dance: :dance: Welcome to the family :dance: :dance:

Instead of using
http://domain.com/images/picture.jpg
use
/images/picture.jpg

This is assuming that your file is in the public_html firectory and that your images are in the public_html/images/ directory
Andy Beckett
-----------------
Part of the TCH family since the beginnings of time.

#4 seaheather

seaheather

    New To The Neighborhood

  • Members
  • Pip
  • 6 posts

Posted 20 November 2003 - 09:28 PM

Hi Andy,

Thanks, but it doesn't work for me. Whenever I try to just use /images as the address, the pictures do not show up. I have to use the whole path. My images are in the images folder, and my index file is in the public_html folder, so it OUGHT to work, but it simply does not. I had the same problem with my last web host, so it isn't a new problem for me. I just can't see what I'm doing wrong!

Karen

#5 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 20 November 2003 - 09:47 PM

Karen,
have you tried images/imagename.jpg
as a relative path it will look for the image folder below the current place the site is located.
And if you have an image folder below your site on your computer with the same images, it will also work.


And :dance: Welcome to the family :dance:

#6 seaheather

seaheather

    New To The Neighborhood

  • Members
  • Pip
  • 6 posts

Posted 21 November 2003 - 07:23 AM

I tried that, Don, and it didn't work. BUT this morning I tried eliminating that first front slash, and lo and behold it now works! So the answer was to not use the front slash before the name of the images folder. At least that seems to be the case. Until the gremlins get in there and mouse me up again, I'm a happy camper! I've come to realize that the more I think I know about computers, the less I really know. Or is it that the computer simply wants to put me in my place?

Thanks to you and to Andy for the replies. I was feeling extremely frustrated, and having people give suggestions was a big help. I wonder why that front slash didn't work for me, when it seems to be the way most people are doing it? As long as I've found a solution, I guess I shouldn't question!

Thanks again to you both!

Karen

#7 agsilva

agsilva

    New To The Neighborhood

  • Members
  • Pip
  • 11 posts

Posted 02 March 2004 - 11:46 AM

Hi. I am having the same problem. I have tried using slash, no slash, etc. but the image refuses to load. It is a png. The alt text does show up though.

EDIT: Got it. I has spelled source= out completely. Been awhile. Should be src=
;)

#8 BigDaddyJinx

BigDaddyJinx

    Family Friend

  • Members
  • PipPip
  • 40 posts

Posted 04 June 2004 - 03:07 PM

Ok so I'm a newbie to TCH but bear with me. I have 2 other sites hosted elsewhere through my ISP and I had no issue whatsoever setting them up and having them work. I've never had a "paid" host before, and some of the gear is strange, but not strange enough to prevent me from seeing what I wanna see. Therein lies the problem. I have a domain and all but it'll take 72 hrs approx. to have it cycle through the world registers, so I'm using the IP for now.

I've uploaded all my files from the sites to this host and placed them in the appropriate folders (or so I believe), but when I goto http://IPaddress/index.html or http://IPaddress/www/index.html all I get is a generic error that says I have no site set up at that address!

What gives?! Mad!!!

All my html files are in the public_html folder, images are in the images folder, but no go. I'm stressed. Am I doing this wrong? Did I miss a step? HELP.

#9 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 04 June 2004 - 04:18 PM

First :P Welcome to the family :dance:

in your welcome e-mail you should see

==========================================
Access your Site
==========================================

To access your site before the domain name completes
propagationyou can go to the URL below to view your site.

http://IP/~username/

Edited by TCH-Don, 04 June 2004 - 04:20 PM.


#10 sheryltoo

sheryltoo

    Distant Family

  • Members
  • PipPipPip
  • 153 posts

Posted 15 November 2004 - 10:15 AM

Hi, I am new too and getting so frustrated.
I've been trying to set up my index.html page for a couple days now using a double background and placing a welcome banner on my site.
I thought I created a background folder to hold my images but I think I created a background file instead since it showed up looking like a file and not a folder.
Thinking this was a folder, I uploaded my graphics to it, but now that I'm learning a little more about what I'm doing, I think all I did was upload the graphics to my public_html folder since everything was listed below all my folders including that backgrounds file.
In any event, after doing all that but basically doing it wrong, I was able to see my graphics if I used this for the path to my graphics:
http:www.domainname.com/graphic.jpg
Now that I realized I put my graphics in the wrong place, I decided to set up a folder under public_html, called backgrounds and moved all my graphics to it, but now my graphics won't show up.
First of all, just to be sure I set up my folder correctly, let me explain what I did.
I opened my public_html folder and said I wanted to create a new folder.
I named it Backgrounds. When my pictures wouldn't show up, I tried naming it Backgrounds_html. Which is correct?

Once I had my background folder created, I moved all my graphics to it but didn't change the path on my index.html page thinking they should still show up but they didn't.
I then tried to edit the path to just backgrounds/graphic.jpg but that didn't work, so I put my domain name first, then the background folder and still no graphics will show up.
I must be doing something wrong but I don't know what.
I guess I first need to be sure I created my folder correctly.
Sheryl

#11 btrfld

btrfld

    Immediate Family

  • Members
  • PipPipPipPip
  • 592 posts

Posted 15 November 2004 - 10:43 AM

Hi Sheryl.
Based upon your explanations, I have a couple of thoughts.

The folder for your images can be called anything, so Backgrounds or Backgrounds_html should work equally well.

I suspect that your trouble is that Linux is case-sensitive. So if your folder is named Backgrounds, the references should be Backgrounds/graphic.jpg rather than backgrounds/graphic.jpg.

Now, again about the reference in the code: using Backgrounds/graphic.jpg produces a relative reference, meaning that the browser will look for the Backgrounds folder in the folder containing the html page itself. To reference the Backgrounds folder from anywhere, and allow portability of your html, you can use /Backgrounds/graphic.jpg, which looks for the Backgrounds folder directly under public_html, no matter where the current page lives.

Hope that helps a bit.
- Jim
"Be the change you want to see in the world." - Ghandi
Think Locally. Act Personally.

#12 sheryltoo

sheryltoo

    Distant Family

  • Members
  • PipPipPip
  • 153 posts

Posted 15 November 2004 - 02:33 PM

Thanks for the reply. I never thought about the path being case sensitive. Gosh, there's so many things to think about.
I renamed my folder using lower case letters cause I thought that would be easier in the long run and now if I go to my page my backgrounds are showing up. However, if I click show file under File Manager the backgrounds aren't there.
They showed up before I moved those background tiles.
I haven't moved my Welcome sign and that still shows up so I don't understand why the background tiles don't show up, now that I corrected my folder name.

I have another problem. I uploaded a zip file to a new folder called zip under public_html and tried to put a link to this file on my index page but the link doesn't work.
This is how I tried to link it.....
Click
<a href="http://www.domainnam.../zipfile.zip/"> here</a> to save the zip file to your computer.

Is that the correct way to link a file? If so, should it work or does the server not allowing us to link zip files?
Sheryl

#13 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 20,141 posts

Posted 15 November 2004 - 03:13 PM

<a href="http://www.domainnam.../zipfile.zip/"> here</a> to save the zip file to your computer.

That should be: <a href="http://www.domainnam...p/zipfile.zip">

Remove the trailing "/"

Bruce Richards
Forum Moderator
TotalChoice Hosting, Inc.
Webhosting by Total Choice Web Hosting - General Support Forum

I am a Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.


#14 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 15 November 2004 - 04:10 PM

Sheryl, I would recommend using an FTP program to manage your files
as file manager is not the easiest way.

With an ftp program you will will have two windows side by side
one showing a folder on your computer and the other showing a folder on your site.
You can select and drag from computer to site, or from site to computer.
Some will even let you view the file on your site.
You can select a site folder or file and right click to rename, delete or change its attributes (read, write.....) called permissions.
I use CoreFTP Lite
and am very happy with it.

#15 sheryltoo

sheryltoo

    Distant Family

  • Members
  • PipPipPip
  • 153 posts

Posted 15 November 2004 - 05:08 PM

Thanks for the suggestion Don and thanks for telling me I needed to get rid of that
"/". I did that and now I get the option to save my zip file.
I didn't realize linking to a file and linking to another site would be different since I also decided to try linking to another web address and that worked using the "/" at the end of the web address.
Another problem solved.
Sheryl

#16 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 15 November 2004 - 05:18 PM

The / at the end of a link
tells the browser to look for a folder and display the default file inside.

so
www.domain.ext/ will display the default page in the main public folder
www.domain.ext/name/ is a subfolder
www.domain.ext/name.ext is a file

#17 sheryltoo

sheryltoo

    Distant Family

  • Members
  • PipPipPip
  • 153 posts

Posted 15 November 2004 - 07:12 PM

Thanks for that explanation Don.
Sheryl

#18 dooodlebugg

dooodlebugg

    New To The Neighborhood

  • Members
  • Pip
  • 5 posts

Posted 17 January 2005 - 06:30 PM

Hi,

I have a question. I uploaded an index.html to my public_html folder, but when I go to my website, that html doesn't automatically come up. It still goes to the page that says "Index of/" and then lists the folders/files. How do I make it so that when I go to my website, www.mywebsitename.com, the index.html file comes up?

Thanks!

Valerie

#19 TCH-Rick

TCH-Rick

    Technical Support Services Manager

  • Members
  • PipPipPipPip
  • 1,853 posts

Posted 17 January 2005 - 06:39 PM

If you have a file called index.html in the public_html directory it should come up as the default page. Be sure that the filename is lowercase only. Without a domain name I am afraid we cannot be sure what might be happening.

#20 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 20,141 posts

Posted 17 January 2005 - 06:43 PM

Welcome to the family and forums, Valerie! :)

Bruce Richards
Forum Moderator
TotalChoice Hosting, Inc.
Webhosting by Total Choice Web Hosting - General Support Forum

I am a Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.


#21 dooodlebugg

dooodlebugg

    New To The Neighborhood

  • Members
  • Pip
  • 5 posts

Posted 17 January 2005 - 07:00 PM

Hello again,

Thank you very much for the kind welcome and fast response. The tech support on this site is the best I've seen anywhere.

You were right, I had Index.html capitalized. I changed that and it fixed the problem. Thank you again! I'm glad to be part of the family. :)

Valerie

#22 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 17 January 2005 - 07:19 PM

:) Welcome to the Family Valerie :dance:

and your new home!

We really are like family here.
So if you need anything,
just ask your new family!
We love to help :)

#23 AmandaM

AmandaM

    New To The Neighborhood

  • Members
  • Pip
  • 5 posts

Posted 05 February 2005 - 01:15 PM

Hi,

I'm having the same problem as Valerie....Except my index.html is already lowercase but when I go to www.**** all that shows is the HTML code?

I uploaded it under public_html


I'm sure I'll get the hang of this someday but for the time being it's making my brain hurt ;)


Amanda

#24 TCH-Rob

TCH-Rob

    Help Desk Manager

  • Members
  • PipPipPipPip
  • 7,797 posts

Posted 05 February 2005 - 01:29 PM

Amanda,

PM me your domain name and I will take a look and see what may be causing the problem.

#25 mysticnights

mysticnights

    New To The Neighborhood

  • Members
  • Pip
  • 23 posts

Posted 21 January 2007 - 09:01 AM

I have uploaded everything with my FTP ..... but I can't see anything no matter which route I take...I either get the page can not be displayed .... or the other route .... Index of ...

So I am wondering if I put my index files in the wrong place (my index files contain everything I need for my main pages) .....I saved my html as index.html links.html etc.......all those pages I uploaded separately and then I uploaded the full index folder with all the files in it .........now I didn't put that into another folder....should I have?????

#26 mysticnights

mysticnights

    New To The Neighborhood

  • Members
  • Pip
  • 23 posts

Posted 21 January 2007 - 09:57 AM

Okies...never mind that problem....I moved every folder and all my html pages to the public.html folder......I can see something ... not one image .. just black and grey.....sooooooooooo .... do I have to change all my html to view the images? right now I have background="indexfiles/indexheader1.jpg"

so now I am not really sure what I have done wrong...

#27 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 20,141 posts

Posted 21 January 2007 - 10:36 AM

You need a file called index.htm, index.html or index.php for it to load a page by default when you go to your domain link.

And Case matters, these are Linux servers and not Windows.

Bruce Richards
Forum Moderator
TotalChoice Hosting, Inc.
Webhosting by Total Choice Web Hosting - General Support Forum

I am a Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.


#28 mysticnights

mysticnights

    New To The Neighborhood

  • Members
  • Pip
  • 23 posts

Posted 21 January 2007 - 10:46 AM

My main page is index.html I had all my files in a folder called index and I changed that folder to indexfiles.... my index.html page is uploaded separately from that folder.....all my images are directed to that folder.... as in "indexfiles/indexheader1.jpg" everything is lower case ......

#29 mysticnights

mysticnights

    New To The Neighborhood

  • Members
  • Pip
  • 23 posts

Posted 21 January 2007 - 10:49 AM

I put my index.html in the public.html folder along with every html page and all the images folders ...I didn't have them in the public.html folder so I got nothing....now does it matter that I can't access my domain still and using that other way...cause I know none of my links will work...

#30 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 20,141 posts

Posted 21 January 2007 - 10:52 AM

I've sent you a PM please answer it and I will take a look.

Bruce Richards
Forum Moderator
TotalChoice Hosting, Inc.
Webhosting by Total Choice Web Hosting - General Support Forum

I am a Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users