Needing help in understanding how file linking works

Status
Not open for further replies.

n_sabotage_0112

New Member
Messages
2
Reaction score
0
Points
0
As of a few hours ago, I discovered this website, so I'm quite new to it.
I went through the walk through and, from my understanding, in the file manager, uploading files to public_html will make all uploaded files public.
I was able to set up a home page with no problem and uploaded some files to the aforementioned directory, however I ran into a huge issue when it came time to make menus. As the title suggests, my issue is I really have no idea how to go about linking my uploaded files.
All I need to know is how I can go about accessing them so I can link them using an <a href> tag.
It may be moot, but I'll also need these same links to be usable in a frame setting.

I've read a few forum threads that suggested that I use my forum name or domain name and an extension of .x10hosting.com/folder/file name, which I've tried and gotten either a 404 error or a notification that the page does not exist.
I've also tried adding the folder name, the entire path to the file, and then simply the file name to the end of my domain and forum name, and I get the same errors.


I would assume I'm overlooking something, so if anyone has any suggestions, that would be greatly appreciated.
This situation is started to get a bit frustrating.
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
Your domain has the extension of .x10.bz That's why it's not working as I understand that you've done.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
You don't need to worry about the file paths on the server when creating a URL (the value that goes into the href of a link on the web). What matters is the "web path". That is all relative to your public_html folder.

For instance, your index.html (or index.php, as the case may be) is accessible on the web using your domain alone. I don't have AIP access, so I don't know your actual subdomain, but let's say it's foo.x10.mx. That means that http://foo.x10.mx/ will open your index page (the server opens an index.html or index.php file by default if it exists in the directory). You can also open that page using http://foo.x10.mx/index.html as the address.

For files that live in the public_html directory, you can use http://foo.x10.mx/filename.html -- that tells the web server to serve filename.html from your document root (the public_html folder). To access a file that lives in a folder inside public_html, you'd use http://foo.x10.mx/directory/filename.html.

Now, for links that live on the same server, there's really no need to use the "http://foo.x10.mx" part. If you use a link like this:

HTML:
<a href="/filename.html">Link text</a>

...the browser will automatically add the "http://foo.x10.mx" part for you. That will make a big difference if you ever decide to change your domain name, or even if you make your site accessible via more than one domain. The leading slash in the href makes the URL relative to the server's document root, and allows the link to use the same protocol (http or https), server (the fully-qualified domain name for the server) and port (if you're using something other than the default port). In other words, it doesn't matter how the user is accessing your site, none of your links are going to surprise the user -- there will be no domain changes, no protocol changes (going from a secured connection to an unsecured one), etc.
 

n_sabotage_0112

New Member
Messages
2
Reaction score
0
Points
0
You don't need to worry about the file paths on the server when creating a URL (the value that goes into the href of a link on the web). What matters is the "web path". That is all relative to your public_html folder.

At first, I tried what you had mentioned and I swear it didn't work. Only later did it occur to me to see if the link was case sensitive. It turns out it is, much to my surprise.
In all my experience, case has always been irrelevant.

Regardless, thank you for taking the time and effort into helping me, I really appreciate it.
 
Status
Not open for further replies.
Top