Question about URLs

Discussion in 'Site & Server Administration' started by bobthebuilder, Jul 25, 2006.

  1. #1
    I am trying to figure out how the following URLs work:

    http://meyerweb.com/eric/css/edge/
    http://www.alistapart.com/topics/code/css/

    I mean there is no page name. I thought maybe it was an index.htm(l) page that the browser defaulted to, but when I type index.htm or .html after the / I get an error and that is the same for every link on their site.

    Here is a URL that I am used to seeing: http://www.billybobspalace.com/shootme.html (not a real site)

    How does this work? I would like to stray away from the page name thing.
     
    bobthebuilder, Jul 25, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    They might be using index.php or index.shtml or some other file default file. IIS for example uses default.htm for directory URLs.

    You can also do this using mod_rewrite (Apache) to map a directory URL to a specific file, for example:

    RewriteRule ^some-directory/?$ this-file.html

    Note how the trailing / is optional. Full details about mod_rewrite can be found elsewhere.

    Cheers, Cryo.
     
    Cryogenius, Jul 25, 2006 IP
  3. bobthebuilder

    bobthebuilder Peon

    Messages:
    12
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, thank you very much. Learned something new for the day. :)
     
    bobthebuilder, Jul 26, 2006 IP