Forum Moderators: open
The titles are fake but let's say the new folder is:
"sports"
within this folder is my new website, including index.htm, and a folder for pictures called "pictures"
when i link a picture using dreamweaver it directs it like so: img src="/pictures/burgerlogo.jpg"
but online it doesn't come up because the url becomes:
http://example.com/pictures/burgerlogo.jpg
it should be
http://www.example.com/pictures/burgerlogo.jpg
does anyone know how to fix this? even if i hand code it the code says img src="/pictures/burgerlogo.jpg"
how can i add a 'www' onto it?
thank you!
[edited by: encyclo at 8:02 pm (utc) on Dec. 23, 2006]
[edit reason] switched to example.com [/edit]
<img src="pictures/burgerlogo.jpg" />
The titles are fake but let's say the new folder is: "sports". within this folder is my new website, including index.htm, and a folder for pictures called "pictures"when i link a picture using dreamweaver it directs it like so: img src="/pictures/burgerlogo.jpg"
What you want is to either 1)create a folder on your local drive called sports so you have /sports/pictures/burgerlogo.jpg and update your local pages, or 2) change your code so it reads /sports/pictures/burgerlogo.jpg.
The problem is not in http:// or [www....] The leading / means "wherever I am, start at the domain root." So it doesn't matter if you're using www or not:
http://example.com/sports/pictures/burgerlogo.jpg.
http://www.example.com/sports/pictures/burgerlogo.jpg.
Are led to the same place by
/sports/pictures/burgerlogo.jpg.
The advantage of using the leading slash: doesn't matter whether your file is at root or in a sub-sub-sub directory, the path remains the same. You don't have to count slashes and dots. :-) ../../../
would i have to manually enter the url for the pictures?
let's say my sites look like this:
old site main folder
- old site index
- old site picture folder
- old site content
- new site
- new site index (within new site folder)
- new site picture folder (within new site folder)
- picture (within new site picture folder)
and i wanted to get the picture in the new site picture folder to appear, on my new site domain name
dreamweaver is listing it simply as href- /new site picture folder/picture
but it's not coming up
should i put the whole url in the code like: [old...] site.com/new site/new site picture folder/picture.jpg?
will i have to do this for every single picture?
when i click on my image in dreamweaver it says (among other things):
file name: picture
files of type: image files
url: /new site picture folder/picture.jpg
relative to: site root
[edited by: Gomideast at 9:59 pm (utc) on Dec. 23, 2006]
[new...] site.com/new site picture folder/picture.jpg
the image comes up fine, alone, but it's still listed at that address and is (therefore? i assume?) hosted at that address and should appear within the site as well?