Relative vs Fullpath URL

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
justmehere
-


Joined: 15 Jul 2005
Posts: 4

PostPosted: Fri Jul 15, 2005 10:21 pm    Post subject: Relative vs Fullpath URL Reply with quote

My question is simply how do you use full path in hypertext links vs relative. I cannot get the full path URL links to work.

For example:

I am running the my document path as follows c:\my-website
within this directory I have the index.htm file which loads fine and sub-directories.

e.g.
subfolder1
subfolder2
...

Now if I have a URL in the index.htm page pointing to another webpage located in a subfolder as follows:

http://192.168.1.99/subfolder1/webpage.htm

it will not work. I can get to the root index page but when click on the URL
http://192.168.1.99/subfolder1/webpage.htm and get page cannot be displayed.

However if I change the URL located in the index.htm page to "/subfolder1/webpage.htm" (relative) it works. I wish to use the full path and not a relative path link. I have looked all over the console web server configuration page and cannot figure it out from there.

Any help would be appreciated.

Thank you
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jul 16, 2005 1:18 pm    Post subject: Re: Relative vs Fullpath URL Reply with quote

justmehere,

It is a good practice to use virtual paths instead of full URLs in the HTML code of your site. So use /subfolder1/webpage.htm instead of http://192.168.1.99/subfolder1/webpage.htm for the values of HREF and SRC HTML arguments.

This is recommended because with virtual paths only the sites contents can be viewed regardless of your domain name or IP changes. If you hardcode the full IP/domain name in HTML code as in http://192.168.1.99/subfolder1/webpage.htm , you'll have to change all your HTML pages everytime the IP changes which a loss of time and energy.

For your information, browsers know how to make a full URL from a virtual path only. So you need not to give them the full URL unless your are linking to a page which is not on your site.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
justmehere
-


Joined: 15 Jul 2005
Posts: 4

PostPosted: Sat Jul 16, 2005 5:28 pm    Post subject: Re: Relative vs Fullpath URL Reply with quote

Thank you for the helpful reply. I will use the relative path for all links as you have said should the IP address change the URL links will no longer work.

But last question will the full path work with Abyss webserver (free edition) ? I was using an older version of MyWeb with full path links and when I switched to Abyss the links stopped working.

http://www.xuebrothers.net/myweb/myweb.htm

Thank you

P.S.

The other reason I was using full path was because the full path was not correctly being displayed in the address bar. I am using Word 2000 to create my website.
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Sat Jul 16, 2005 6:15 pm    Post subject: Re: Relative vs Fullpath URL Reply with quote

justmehere wrote:

But last question will the full path work with Abyss webserver (free edition) ?


Full paths work fine, it's just not the way most people choose to create their URLs, for the reasons Aprelium gave.

justmehere wrote:

I am using Word 2000 to create my website.


I think we found your problem ;)
Back to top View user's profile Send private message
justmehere
-


Joined: 15 Jul 2005
Posts: 4

PostPosted: Sat Jul 16, 2005 9:42 pm    Post subject: Re: Relative vs Fullpath URL Reply with quote

Thanks again to everyone for the helpful information.

Final question what is wrong with using Word 2000 ? Is there a better html editor that is easy to use for beginners like myself ?
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Sat Jul 16, 2005 11:28 pm    Post subject: Re: Relative vs Fullpath URL Reply with quote

justmehere wrote:
Final question what is wrong with using Word 2000 ? Is there a better html editor that is easy to use for beginners like myself ?


It is more a question of what is right with it :) It makes horrible bloated HTML code, teaches you bad habits, and isn't really the right tool for the job - if you're going to use a Microsoft app for it, use Frontpage which is at least intended to be a HTML editor. Word is just a word processor that happens to be able to export HTML.

If you don't have Frontpage, or would like to use something slightly more advanced, have a look at Nvu.

http://www.nvu.com/

It may take a little more work to get started, but it's well documented and powerful enough for beginners to intermediate designers.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Jul 17, 2005 11:13 am    Post subject: Re: Relative vs Fullpath URL Reply with quote

justmehere wrote:

But last question will the full path work with Abyss webserver (free edition) ? I was using an older version of MyWeb with full path links and when I switched to Abyss the links stopped working.

http://www.xuebrothers.net/myweb/myweb.htm

It's not related to the web server but rather to the fact whether your browser knows how to resolve (find the IP of) the domain name www.xuebrothers.net. If www.xuebrothers.net is correctly configured and associated with your IP address, it will work. Otherwise you will have the classical "Unable to find host" errors.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
justmehere
-


Joined: 15 Jul 2005
Posts: 4

PostPosted: Sun Jul 17, 2005 11:56 pm    Post subject: Re: Relative vs Fullpath URL Reply with quote

Thanks to everyone for the super help. Very much appreciated. Cheers.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group