FTP help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

FTP help

Hey there, I just started actually uploading my website!!! So now I’m not really sure what I should put in the <link> attribute if I want my css to show up on the website. So I uploaded it but just the words show up no css and the links don’t direct me anywhere (it says something like that) so I think the problem is that it really links to a local host but I need to link it to somewhere everyone can access. So can someone please tell me exactly what I need to enter? Thanks in advance

9th Feb 2020, 3:14 AM
Eli
11 Answers
+ 4
Can you share your code? Write it in code playground, then post the link here.
9th Feb 2020, 3:21 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 4
Eli The Boy not the entire code then, I understand it might be private, only show us: 1. How you linked other pages 2. How you linked CSS 3. How is this related to FTP
9th Feb 2020, 3:25 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 4
Eli The Boy no, not like that. A relative path will only depend on which directory the css file is in, compared to index.html If they were in the same folder: href = "index.css" If for example index.css is inside a folder called stylesheets: href = "stylesheets/index.css" And so on..
9th Feb 2020, 3:40 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 4
It's just how the browser handles relative paths. When the web server starts, there is a specific directory that is being hosted, the one that contains index.html If you want to know more about it, you can read it in more details on google or similar. You don't need to understand it to work with it tho, relative paths will always work, as long as the file you're trying to access has the right permissions.
9th Feb 2020, 3:44 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 3
Why don't you use relative path then?
9th Feb 2020, 3:32 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
Aymane Boukrouh okay it worked thanks a million
9th Feb 2020, 4:17 AM
Eli
+ 2
Eli The Boy no problem!
9th Feb 2020, 4:24 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
lol Id really rather not publicize it here but does it help you to say that Im using 000webhost free version? Aymane Boukrouh
9th Feb 2020, 3:23 AM
Eli
0
<link rel = "stylesheet" href = "http://localhost:9898/Local/Family%20Website/Index/index.css?E427F499-04EF-415A-9628-3E74737A638C"> this is the original in my actual html editor app and now that I posted it to an htp, since the file isnt in the above link anymore it wont direct them there now I need to link everything to a file or folder in the ftp file, sorry if im not explaining myself correctly
9th Feb 2020, 3:29 AM
Eli
0
meaning the website then the path? tried and didnt work, maybe Im doing something wrong but I did this: lest say I put them both in the public_html file, so I did <link rel = "stylesheet" href = "abcdefg.000webhostapp.com:/public_html/index.css"> (assuming that was the name of my website)
9th Feb 2020, 3:37 AM
Eli
0
but how would the browser know where to look if I only enter the filenme?
9th Feb 2020, 3:41 AM
Eli