Confused newbie - path directory not linking index to everything else

Post all HTML related questions here. No support.

Moderator: Project members

Post Reply
Message
Author
beellllaa
500 Command not understood
Posts: 2
Joined: 2018-03-02 22:55
First name: Bella
Last name: Wella

Confused newbie - path directory not linking index to everything else

#1 Post by beellllaa » 2018-03-02 23:38

Hi everyone !

I'm new to filezilla and hosting. I have my index.html in my www folder and I put like everything else in a folder called "SITE" that has many other folders for whatever. I can't seem to get the path right in my index to relink back into this site folder.

As a simple(?) example,
I have an icon for the tab that I want and it's an .svg file. The path on my local is this "Desktop/SITE/assets/img/icon.svg" So since my index is in the SITE folder my code looks like this:
<link rel="icon" type="image/svg+xml" href="assets/img/icon.svg">

When I take my index out of the SITE folder, and I put it in the www, obviously it loses the connection. So I've tried the following options:
<link rel="icon" type="image/svg+xml" href="../assets/img/icon.svg">
<link rel="icon" type="image/svg+xml" href="www/SITE/assets/img/icon.svg">
<link rel="icon" type="image/svg+xml" href="../SITE/assets/img/icon.svg">

Please help with my potentially dumb question ):

How can I reconnect this SITE folder back to my index if my index can't be inside the SITE folder?

Thank you in advance !!

User avatar
boco
Contributor
Posts: 24153
Joined: 2006-05-01 03:28
Location: Germany

Re: Confused newbie - path directory not linking index to everything else

#2 Post by boco » 2018-03-03 02:27

Please don't cross-post (other post deleted). Also, moved, since it hasn't anything to do with FTP.

If, on your webserver, the www directory is the so-called web root, then absolutely nothing outside that directory is served by the HTTP server. In other words: Everything you want to be part of the website (visible to browsers) must be inside the web root. So, move everything website-related into www and change your links according to that situation.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
All FileZilla products fully support IPv6. http://worldipv6launch.org
### END SIGNATURE BLOCK ###

beellllaa
500 Command not understood
Posts: 2
Joined: 2018-03-02 22:55
First name: Bella
Last name: Wella

Re: Confused newbie - path directory not linking index to everything else

#3 Post by beellllaa » 2018-03-03 10:08

Hi boco -

Ah I'm sorry about that! I was a bit frantic and frustrated last night with this and I just needed an answer. I had assumed FTP was anything related to the filezilla workspace so I apologise on behalf of my neglegence.

In regards to your reply for my issue -
Everything for my site is in the www directory. Within that directory, I have index.html, style.css, and a folder that has everything else, which is called SITE.
I found that even when I put the style.css into my site folder, the path is lost from the index - and I did a lot of troubleshooting with different paths to try to fix this.
So I took the style out of that folder, and put it with the index.

However, everything that is in my site folder (which is in the www directory) is not being found.
I've tried multiple pathways, as mentioned in my main post, to get the index(in the www directory) linking back up to find that site folder(also in the www directory).

As of right now, my website is only displaying the index and the style page. But my site should be a fully functioning portfolio site.

I hope I've explain this a little better!

User avatar
boco
Contributor
Posts: 24153
Joined: 2006-05-01 03:28
Location: Germany

Re: Confused newbie - path directory not linking index to everything else

#4 Post by boco » 2018-03-03 21:56

Check how the directories are named EXACTLY. Contrary to e. g. Windows, everything path-related on web servers (that run on *NIX OS with POSIX file systems) is case sensitive! So, if the directory is named SITE, use exactly that capitalization in paths, or it will not work.

Example:

Code: Select all

<link rel="icon" type="image/svg+xml" href="SITE/assets/img/icon.svg">
www is web root, so it MUST NOT be specified (as for the HTTP server, www does only exist as / (root). The root slash should be omitted to keep the links relative (the complete structure can be moved anywhere without having to fix links). Files in the same directory are linked by only the file name.

SITE MUST BE specified as-is, that means, all-caps if that's the directory name.

Same for the other directories AND the file names. Icon.svg is a different file as icon.svg or ICON.SVG.


For *NIX-like web server, you also have to check permissions (if you get 403 or 404 errors although files are there).
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
All FileZilla products fully support IPv6. http://worldipv6launch.org
### END SIGNATURE BLOCK ###

Post Reply