Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthornein
    • CommentTimeMar 6th 2008
     permalink
    Hi everyone,

    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

    <li id="tabout"><a href="/about/?phpMyAdmin=4594f30712f4fabaff6997416810f3f2">About</a></li>

    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/

    Thanks so much.

    James
    • CommentAuthordave_o
    • CommentTimeMar 7th 2008
     permalink
    Hi nein,

    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.

    Dave.
    •  
      CommentAuthorArcNeXuS.net
    • CommentTimeMar 8th 2008 edited
     permalink
    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...
  1.  permalink
    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.
    • CommentAuthornein
    • CommentTimeMar 10th 2008
     permalink
    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?
    • CommentAuthordave_o
    • CommentTimeMar 10th 2008
     permalink
    Hi nein,

    yourWebSiteDir:

    • css
      • style.css
      • ...//eg. different styles for different media, reset.css etc.

    • page1
      • index.html

    • page2
      • index.html


    in page1/index.html (as well as page2/index.html ...):
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    • CommentAuthornein
    • CommentTimeMar 10th 2008
     permalink
    Dave, you are my savior!

    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/.

    I'm curious as to why this is happening?
    • CommentAuthordave_o
    • CommentTimeMar 10th 2008
     permalink
    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:

    '<a href="../services/?phpMyAdmin=4594f30712f4fabaff6997416810f3f2">my services</a>'

    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:

    '<a href="http://www.index.com/services/">my services</a>'

    But I suggest the first solution, since it is more flexible.
  2.  permalink
    Going off what dave_o said, I would also recommend that you make the path to your css file(s) direct links, not relative, like this:

    <link rel="stylesheet" type="text/css" href="http://www.domainname.com/css/style.css" />

    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.
    • CommentAuthornein
    • CommentTimeMar 10th 2008
     permalink
    Great, I appreciate the help a lot from both you impress lab and you Dave.

    Thanks,

    James
Add your comments
    Username Password
  • Format comments as (Help)