Sorry I have just been full of questions the last few days. How do you make it so that in the address bar it says website.com/about instead of website.com/about.html
I have done this, then I made a folder and called it "about" then inside the "about" folder I made a file called "index.html". But it does not work, what am I doing wrong, can anyone let me know how to accomplish this/
yet again, very simple: it's: 'href="about/"' and not 'href="/about/"'. That's how it should work, if it doesn't, look at the access permissions on your server. If directory access is granted to all users, the browser will list the content of the directory instead of showing the index.html file. Further index.html has to be set as standard file to load.
an alternative is to load the whole site into a single frame ... so that your first index page is only a frame layout... from then on whatever address was on the frame page will show thru the whole site... in other words it will always say www.website.com in the address bar....no matter where you are on the site.... an old trick but it works ..
Of course from then on all targets would have to point to the frame itself...
I would personally advise against using frames as the site visitor would not then know what page he or she is on (it always says www.website.com). Plus it may make it a bit more complicated to design the site I think. I may be wrong however...
What Dave said should work. I've never had any problems with this and I use "href="about/"' tags like Dave mentioned.
Thanks for everyones help so far. I did manage to get the first part to work, then ran into another issue. Where would I place my stylesheet so it can be accessed by all files. If I am going to be nesting pages into folders, how can I make it so the stylesheet will be accessed?
I am learning a lot about how these directories work. I did run into another problem (can you believe it?). If i click say index.com/about/ then I want to go to index.com/services/ the browser will look for the "services" page inside "about" so it will look like this index.com/about/services/.
Because the value of the attribute 'href' is a relative address which allways starts in the current directory (the same one, in which the page containing the link is located). In your case a link on the page about/index.html would have to look like this:
to work properly (and really link to index.com/services/). '..' is being interpreted by the browser as parent directory. You can use absolute addresses as well:
Such that now matter where you have your html page (such as about/index.html or about/history/blah/blah/index.html), it still points to the same spot - you don't have to worry about changing the relative link depending on where you put the html file. Good luck, and feel free to keep the questions coming!Let us know if you run into a troubles.