|
-
Feb 6th, 2002, 05:06 PM
#1
Thread Starter
New Member
HTML...question
Okay...this may sound stupid, but I just started HTML, and I can't find out how to do this. I want to have a main website with a list of all the things you can go to, then I want to have the list as links to different parts of the website. I know how to make lists and links, but I can't figure out how to have different pages. Mine's all on one page right now. So, could anyone help me? Thank you.
Piggins
-
Feb 6th, 2002, 06:08 PM
#2
Hyperactive Member
all you have to do is make a new text file and rename it to whatever.html and do all your codeing in there and upload it to your host then edit your page with the links to go to it like
Code:
<a herf="/whatever.html">Whatever Text</a>
sorry if the code is off...haven't done HTML coding in awhile...I use dreamwearver now.
p|-|34|2 /\/\3 f0|2 | $p34k 1337 
My TSS quote of the day: "If your haveing a bad day, just press the restart button."
-
Feb 6th, 2002, 11:49 PM
#3
Stuck in the 80s
Originally posted by scsa20
all you have to do is make a new text file and rename it to whatever.html and do all your codeing in there and upload it to your host then edit your page with the links to go to it like
Code:
<a herf="/whatever.html">Whatever Text</a>
sorry if the code is off...haven't done HTML coding in awhile...I use dreamwearver now.
Dreamweaver is da devil!
If your whatever.html is in the same directory as the current page, you need:
Code:
<a href="whatever.html">Whatever Text</a>
I however, suggest this:
Code:
<a href="http://www.mysite.com/whatever.html">Whatever Text</a>
That way no matter what the current directory is, you can get to the page. This is especially good if you get into SSI (Sever Side Includes)
-
Feb 7th, 2002, 11:54 AM
#4
Black Cat
Hard-coding full URLs will be a pain if you ever need to move the pages to another server...
If your link looks like <a href="page.html">, the browser will request it from the server in the current directory.
If your links looks like <a href="/page.html"> the browser will request it from the root of the server, so the full url would be "http://www.server.com" + "/page.html", so "http://www.server.com/page.html".
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Feb 7th, 2002, 03:00 PM
#5
Stuck in the 80s
Originally posted by JoshT
Hard-coding full URLs will be a pain if you ever need to move the pages to another server...
If your link looks like <a href="page.html">, the browser will request it from the server in the current directory.
If your links looks like <a href="/page.html"> the browser will request it from the root of the server, so the full url would be "http://www.server.com" + "/page.html", so "http://www.server.com/page.html".
and if he has his page on geocities or some other such service and uses <a href="/page.html">, it will request it from "http://www.geocities.com/page.html" am I correct? That would lead to a 404.
And with the find/replace options, it wouldn't be that hard to fix if you changed servers. And I use something like:
"<#include file="linkto.txt">/images/05.gif" (SSI) so when it reads it, it will put "http://www.mysite.com/images/05.gif" in the link. (because I do change servers often)
-
Feb 8th, 2002, 12:29 PM
#6
Black Cat
and if he has his page on geocities or some other such service and uses <a href="/page.html">, it will request it from "http://www.geocities.com/page.html" am I correct? That would lead to a 404.
Exactly.
As far as hard-coding URLs - what if intranet and internet users both access the same web server, but use different names or ip addresses to get at it?
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 19th, 2002, 06:36 AM
#7
Member
so, what is the solution for it if you getting from geocities account
-
Jun 19th, 2002, 10:49 AM
#8
Stuck in the 80s
I always just type out my full URLs, ie: http://www.geocities.com/fungiman/page2.shtml
And if I ever need to change servers, a quick replace of http://www.geocities.com/fungiman to http://www.fungiman.com will be a breeze.
What was the question?
-
Jun 19th, 2002, 07:15 PM
#9
Member
Mr Hobo,
So if your method is like that (give all as absolute path/link), then, if you have like 20 pages that referring to the same page, you would have to change all links in those 20 pages.
Is there any other easy method on doing this. One of my friend suggested to use a definition variable and include that in all your page. This would ease the pain if you ever one to change server. Please let me know, what do you think of this?
-
Jun 19th, 2002, 07:53 PM
#10
Stuck in the 80s
Then use server side includes (SSI) or PHP Include() to include a seperate menu file or whatever so that you only need to change one file, which is called by all of the 20 files. Unless all 20 pages have different links, then use PHP and a variable (if that option is available to you) in a header part.
There's many things you can do, depending on your situation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|