gthorley
09-07-2000, 10:48 AM
Sorry folks despite all the great help I still have some problems with this.
If using the same site but pointing to a different directory would not the name of the main site be visible by viewing the path on mouse overs. Our site is presently redirected to the old freebie with @home and the actual name and location of files is visible. I have tried calling files on our site using the domain name and actual directory ie http://www.artbyjudy.com/florals/florals.htm
but get a file not found so if I change the links to this format it will not work. Is their a simple way to do this with code patched to the original page that comes up on redirect?
Ok, let say you build a site called domain1.com and have a menu to two pages there page1.htm and page2.htm . If you made your menu links like so a href="../page1.htm" and
a href="../page2.htm" then when you call the site domain1.com and scroll over the menu it will say http://www.domain1.com/page1.htm and http://www.domain1.com/page2.htm . When you call the site from domain2.com it will say http://www.domain2.com/page1.htm and so on, as long as the links are to ../link the ../ will force the browser to use the domain name already being viewed.
One more thing....what Jaguar said is correct, you should use relative links (../), BUT, that will not work if you have a base tag.....if you have a base tag in the head of the document, delete it.
gthorley
09-08-2000, 03:35 PM
Thanks Guys I think maybe that is what I need so say I am linking to a lower directory as in http://www.artbyjudy.com/artists/florals/flower1.htm if I use
../artists/florals/flower1.htm then on mouseover if I got to this page from say http://www.newdomain.com it would show the link as follows http://www.newdomain.com/artists/florals/flower1.htm
When using a program such as dreamweaver to get this I indicate that the link is relative, correct?
Graham
Learner
09-08-2000, 06:07 PM
gthorley, I hope this helps in your understanding of the two types of links better:
A. What is a link?
It is a pointer to an address (URL) of a directory or file (and in some cases, a specific position within a file) located on a server. A link could point to a directory or file which may be either stored on your server, or any other server on the internet.
B. What does clicking on a link do?
Clicking on a link will force the browser to access the directory or file the link points to.
C. How many types of links are there?
Two. They are:
(1) Absolute (or Complete) Links.
(2) Relative (or Partial) Links.
D. What is an Absolute Link?
It is a pointer to the complete address (URL) where a directory or file resides on the internet. The word complete means the inclusion of the full domain name. with subdirectorys (if any). before the file name.
Examples of what Absolute Links would look like:
http://www.newdomain.com/artists/florals/flower1.htm
or
http://www.artbyjudy.com/artists/florals/flower1.htm
In this case, the file flower.htm has to be physically stored (available) on the server which the domain name resolves to.
E. What is a Relative Link?
It is a pointer to a directory or file stored within a related hierarchy (levels) of directorys above or below it (as within in a directory tree that you see in Windows Explorer).
Examples of what Relative Links would look like:
SRC="flower1.htm" meaning that the file is inside the same directory as the position of the html document calling for it.
or
SRC="../flower1.htm" meaning that the file is in a directory one level above the position of the html document calling for it.
or
SRC="../../flower1.htm" meaning that the file is in a directory two levels above the position of the html document calling for it.
or
SRC="florals/flower1.htm" meaning that the file is in a directory one level below the position of the html document calling for it.
or
SRC="artists/florals/flower1.htm" meaning that the file is in a directory two levels below the position of the html document calling for it.
or
SRC="../florals/flower1.htm" meaning that the file is in a directory one level above and then one level below the position of the html document calling for it.
or
SRC="../../../artists/florals/flower1.htm" :D I'm not even going to try to explain this one... hope you have understood by now :D
When using a program such as dreamweaver to get this I indicate that the link is relative, correct?
Yes. That is correct. But from the above explanation, you will have to store all your files on the same server as the "html document calling for it".
From what I feel from your above post, gthorley... you haven't realised that a Relative Link is always in relation to the position of a "html document calling for it". Therefore, the necessary files being called for have to reside on the same server as "the html document calling for it".
I hope this removes your confusion, gthorley.
Learner
Learner
09-08-2000, 06:28 PM
Originally posted by gthorley
I have tried calling files on our site using the domain name and actual directory ie http://www.artbyjudy.com/florals/florals.htm
but get a file not found
gthorley, my last post intended to remove your confusion (if any) about the two kinds of links.
In this post I would like to point out that there are only three reasons why you could possibly be getting a 404 File not found error.
1. The URL you linked to is incorrect.
2. The URL you linked to is incorrect. :D ... and,
3. The directory or file just doesn't exist now (for whatever reason) at the URL you have linked to.
So, I think your problem is that either your URL has been keyed in incorrectly OR for whatever unknown reason, the directory or file you have linked to does not exist now.
First do check if your original files are actually there on the server at the URL you are linking to.
Has this helped?
By the way, some nice artwork you have there at your http://www.artbyjudy.com website :)
Learner
[Edited by Learner on 09-08-2000 at 06:42 PM]
gthorley
09-08-2000, 07:31 PM
Learner, Many thanks I have a much better understanding of links from your explanation.
My wife appreciates your comments on her paintings.
Concerning your last post the url
http://members.home.net/gthorley/florals/florals.htm
is a valid one the domain name artbyjudy.com is being redirected from an url forwarder which points to the address
http://members.home.net/gthorley what I now realize is that
the url http://www.artbyjudy.com/florals/florals.htm is not valid.