access second webpage

Post all HTML related questions here. No support.

Moderator: Project members

Post Reply
Message
Author
dmrob99
500 Command not understood
Posts: 2
Joined: 2014-04-24 14:53
First name: Dori
Last name: Robinson

access second webpage

#1 Post by dmrob99 » 2014-04-24 15:06

I am new to HTML and Filezilla, so please bear with me on what has to be a simple question....
For a class project, I created 3 webpages in notepad: index.html, gallery.html and contact.html.

I used filezilla to upload to server.
The index.html page fine - everything works except when I try to link to the other pages. I have tried and tried to figure out the right url to use, but keep getting "not found" messages.
Here is the pattern I am trying:
http://example.com/public_html/gallery.html/
I have tried leaving off public..., "I have tried leaving off the .html
I am really stumped and would appreciate any help. Thanks
Last edited by boco on 2014-04-24 18:45, edited 1 time in total.
Reason: Used special documentary host name

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

Re: access second webpage

#2 Post by boco » 2014-04-24 18:43

http://example.com/public_html/ is your so called webserver root. In other words, for your website files that's the root directory. You could use absolute linking by using "/gallery.html" and "/contact.html" as link targets, but the recommended method is relative linking. Since your three files are in the same directory it's actually easy - link targets are "gallery.html" and "contact.html" (only the filenames). With relative linking your little site will always work no matter where you move it, as long as you keep all three files together.

1. For relative links, you just use the relative path, seen from the current file. Everything that's the same does not need to be specified.
2. Relative link targets do not start with a "/".
3. You can use the "." (same dir) and ".." (parent dir) special descriptors. Note that the former can be left out.
4. Do not include the domain name in your links unless you have to (linking to other domains)!

Examples:
a) Target in the same directory: Only the filename, e.g. "gallery.html" (or "./gallery.html")
b) Target in a subdirectory 'images': only the subdirectory name and the filename, everything else is the same for source and target ==> "images/gallery.html"
c) Target in the parent directory: Use parent directory descriptor, "../index.html" <== used to jump back from a subdirectory like in example b)

Note: When giving URL examples always use the special example.* hosts, they have been put aside by the IANA specially for documentary purposes. You can use any TLD (Top Level Domain) such as example.info, example.org, example.com.
### 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.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

dmrob99
500 Command not understood
Posts: 2
Joined: 2014-04-24 14:53
First name: Dori
Last name: Robinson

Re: access second webpage

#3 Post by dmrob99 » 2014-04-24 20:20

Thank you so much!!!!!!! I appreciate it - you made it simple!

Post Reply