My Website Index Gives 404 error.

Status
Not open for further replies.

quinngoes

New Member
Messages
3
Reaction score
0
Points
0
I've been experiencing a ton of problems, one being that everything is incredibly slow, another being that sometimes files that are there cannot be found (i get a 404), and another that I can't get all my images to display. Can someone help?

say i put images in a folder called images, and my index in a file one directory up. cant i just put 'src="images\imageName.ext"' in my index file? This works on my local copy but once I upload it the images don't load.
 

Elesarr

New Member
Messages
193
Reaction score
3
Points
0
I've been experiencing a ton of problems, one being that everything is incredibly slow, another being that sometimes files that are there cannot be found (i get a 404), and another that I can't get all my images to display. Can someone help?

say i put images in a folder called images, and my index in a file one directory up. cant i just put 'src="images\imageName.ext"' in my index file? This works on my local copy but once I upload it the images don't load.


the correct syntax would be:

src="images/imageName.ext"

you need to use a forwardslash not a backslash ;)
 

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Last edited:

quinngoes

New Member
Messages
3
Reaction score
0
Points
0
Ya everything has been really buggy but I'm guessing I just joined at the wrong time (while they were updating) haha. I managed to get the images to work by changing the code to '../../Images/imageName.ext'

Just using forward slashes didn't work, thats how I had it originally, and I looked at someone else's html and noticed they used backslashes so I actually went through and changed all of mine haha.

Thanks for the help. Also I'm wondering how I have to set up my files so that I can just have it be 'Images/imageName.ext'. I have my index.html and Images folder both in my public html file.
 

Elesarr

New Member
Messages
193
Reaction score
3
Points
0
Ya everything has been really buggy but I'm guessing I just joined at the wrong time (while they were updating) haha. I managed to get the images to work by changing the code to '../../Images/imageName.ext'

Just using forward slashes didn't work, thats how I had it originally, and I looked at someone else's html and noticed they used backslashes so I actually went through and changed all of mine haha.

Thanks for the help. Also I'm wondering how I have to set up my files so that I can just have it be 'Images/imageName.ext'. I have my index.html and Images folder both in my public html file.

glad I could help ;)

the \ is used generally when referring to the server path and not the URL. The server path is used in reference paths for databases, php scripting etc.

To answer your question, it depends on the structure of your files and folders and if you are using any kind forum software or the like which sets the "root" of your site.

for example, http://your.domain.here/ is generally the root of all websites, however on my own website I use forum software and the root becomes http://your.domain.here/forum/ because that is where my forum files and folders exist.

I use the the http://your.domain.here/ address for my "portal" which contains very little.

what it boils down to is I need a better idea of exactly how your files and folders are set up in public_html folder and in what relationship the images are with the page you want them to appear on.

I hope I haven't confused you ;) if I have ask away and I'll clear it up otherwise give me some specific details of the hierarchy of your files and folders under /public_html/ and I'll be glad to assist you :cool:

EDIT:
I did see you said that I have my index.html and Images folder both in my public html file. however, you said you had to use '../../Images/imageName.ext' to get it to work, that syntax indicates your index.html is 3 levels above where your imageName.ext is, that is why I am asking for more detailed infos to make sure I know exactly how your folder and file structure is setup so I can help you properly.

Just wanted you to know I did read your post but require some more info ;)
 
Last edited:

quinngoes

New Member
Messages
3
Reaction score
0
Points
0
glad I could help ;)

the \ is used generally when referring to the server path and not the URL. The server path is used in reference paths for databases, php scripting etc.

To answer your question, it depends on the structure of your files and folders and if you are using any kind forum software or the like which sets the "root" of your site.

for example, http://your.domain.here/ is generally the root of all websites, however on my own website I use forum software and the root becomes http://your.domain.here/forum/ because that is where my forum files and folders exist.

I use the the http://your.domain.here/ address for my "portal" which contains very little.

what it boils down to is I need a better idea of exactly how your files and folders are set up in public_html folder and in what relationship the images are with the page you want them to appear on.

I hope I haven't confused you ;) if I have ask away and I'll clear it up otherwise give me some specific details of the hierarchy of your files and folders under /public_html/ and I'll be glad to assist you :cool:

EDIT:
I did see you said that I have my index.html and Images folder both in my public html file. however, you said you had to use '../../Images/imageName.ext' to get it to work, that syntax indicates your index.html is 3 levels above where your imageName.ext is, that is why I am asking for more detailed infos to make sure I know exactly how your folder and file structure is setup so I can help you properly.

Just wanted you to know I did read your post but require some more info ;)

ya thats why i got confused and was using the backslash because I figured it was a database path and full url's like http://alsdfa.com/asdf.html use the forward slash while relative paths use a backslash, but i guess i was wrong.

how can i set up my website on my local machine so that when i upload it via ftp i don't have to change any of the code to get the images working?
 

Elesarr

New Member
Messages
193
Reaction score
3
Points
0
ya thats why i got confused and was using the backslash because I figured it was a database path and full url's like http://alsdfa.com/asdf.html use the forward slash while relative paths use a backslash, but i guess i was wrong.

how can i set up my website on my local machine so that when i upload it via ftp i don't have to change any of the code to get the images working?

Most Editors have an FTP client built into them these days and will have you go step by step in filling out your local infos and remote infos.

What I do with my DW is that on my local computer I have a directory that is exactly like the one on my remote server when I connect via FTP. Then I just plug in the infos and DW will sync my folders and keep my links the way they should be when they get published to the site.

Hope I was of some help ;)
 

Smith6612

I ate all of the x10Pizza
Community Support
Messages
6,517
Reaction score
48
Points
48
Just a simple case of messing up server-side paths "\" with relative and exact paths "/". The others above explained everything that you needed to know about this. Many web browsers these days should fix the error if it's seeing it as a request to the web, but in some cases they won't, hence the 404 errors you may be seeing. If it's in the website's coding though, the browser won't fix that.
 
Status
Not open for further replies.
Top