Re: Needing help in understanding how file linking works
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 Code:
<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.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)