Web url & file structure noob question

Discussion in 'HTML & Website Design' started by glendenning.j, Apr 9, 2011.

  1. #1
    Hi,

    Im new to web development and have a question in relation to how website files relate to URL's....

    I know that you put your homepage in the root directory of your web server as an index.html file, but how do other webpage addresses relate to the files on your webserver?

    ie: does the web address of each webpage just reflect the location of the html file that it belongs to?

    I hope I'm making sense.

    Tubs
     
    Last edited: Apr 9, 2011
    glendenning.j, Apr 9, 2011 IP
  2. Sepehr

    Sepehr Peon

    Messages:
    568
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    in a static php site, yes each address reflects the location of the html file.

    say you have all your files in the root("public_html") folder of your website like this:

    1.public_html/index.html

    2.public_html/file1.html

    3.public_html/folder/file2.html


    to address these you'll use the following:

    1.domain.com/index.html OR JUST domain.com

    2.domain.com/file1.html

    3.domain.com/folder/file2.html
     
    Sepehr, Apr 9, 2011 IP
  3. flycatr

    flycatr Peon

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    is it is relative to root directory
     
    flycatr, Apr 10, 2011 IP