SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: URL Question

  1. #1
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I'm wondering if anyone can tell me how to make the following URL technique work.

    At the moment if I want to send someone to a specific area of my website, I have to use the following type of URL:

    Http://www.anywebsite.com/thispage.html

    This sends that person to a webpage, as you can see the URL ends with HTML.

    What I want to be able to do, is change that to the following type of URL:

    Http://www.anywebsite.com/thispage

    I have seen all the big websites do this, especially when they are advertising in a print magazine, and they want to send you to a particular part of their website.

    The second type of URL is a lot easier to remember without the .html at the end.

    I am not sure what they call this type of URL. I think it's called a relative URL of something like that. I could be totally wrong though!

    Can anyone explain in simple step by step terms how I can create URL's without the file name being included in the address?

    Thanks in advance,

    Super Sambora

  2. #2
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    What you would do there is create a direcory called "thispage" and then make "thispage.html" into index.html and put it in the directory. This way when you go to http://www.anywebsite.com/thispage/ it would show the index page.

    I couldn't think of a way to say it anymore easier. If you still don't understand I can elaborate.

    Justin Sampson

  3. #3
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I totally understand! Problem solved.

    Thanks Justin!

  4. #4
    I'm baaaaaaaaaaaaack! Fluffykins's Avatar
    Join Date
    Aug 2000
    Location
    Manchester, UK
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a quick addition on Justin's post:

    Servers can look for index, default or in some cases home first when looking up a http://site/directory style address. Most i've seen tend to use index, but if it doesn't work, checking the server configuration is your first point of call.

    I think IIS servers tend to use default over index unless told to do otherwise.

    Ady
    v-technologies - Freelance Goodness.

  5. #5
    SitePoint Zealot thespian's Avatar
    Join Date
    Sep 2000
    Location
    South Africa
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a further thought to add to this thread.

    I remember reading an article (Lockergnome) where it was stated that when you have a URL that references a directory as opposed to a file (as in the example above), it is always good practice to terminate the URL with a "/" - in other words - http://www.anywebsite.com/thispage/ rather than http://www.anywebsite.com/thispage

    Apparently this is a more efficient and faster-loading way of doing things. I noticed that Justin did this in his example, but I just thought I would highlight the fact.
    Bill Conté [Protected by Psalm 91]
    Web Mechanix
    Growing OLD is Mandatory - Growing UP is Optional!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •