How to access a site to ony type the folde name (not .htm)

Discussion in 'HTML' started by Ole Svensen, Dec 16, 2003.

  1. Ole Svensen

    Ole Svensen Guest

    Hi

    I want to make a website and want the user to only type the folder name to
    access the site.
    Normaly I have to make this:

    www.test.com/test/test.htm

    But I want the user to access this site to type: www.test.com/test

    Any tips?


    BR
    Ole
     
    Ole Svensen, Dec 16, 2003
    #1
    1. Advertising

  2. Ole Svensen

    brucie Guest

    in post <news:2QTDb.6715$>
    Ole Svensen said:

    > I want to make a website and want the user to only type the folder name to
    > access the site.
    > Normaly I have to make this:
    >
    > www.test.com/test/test.htm
    >
    > But I want the user to access this site to type: www.test.com/test


    (assumes apache) stick the below in a .htaccess file[1] for the
    directory you want the directives to apply to. child directories inherit
    the directives so if you stick it in your root the directives will apply
    to all of your site.

    DirectoryIndex test.htm

    [1] a .htaccess file is a plain text file named as shown. if you create
    the file with notepad save the file with quotes to prevent notepad from
    adding a .txt extension i.e: ".htaccess"


    --
    brucie
    17/December/2003 05:49:21 pm kilo
     
    brucie, Dec 17, 2003
    #2
    1. Advertising

  3. "Ole Svensen" <> wrote in message news:<2QTDb.6715$>...
    > Hi
    >
    > I want to make a website and want the user to only type the folder name to
    > access the site.
    > Normaly I have to make this:
    >
    > www.test.com/test/test.htm
    >
    > But I want the user to access this site to type: www.test.com/test
    >
    > Any tips?


    Set the default document/document index value in your server config.
    accordingly. RTFM.

    --
    Hywel
     
    Hywel Jenkins, Dec 17, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2F0aXNo?=
    Replies:
    4
    Views:
    835
    Karl Seguin
    Feb 8, 2005
  2. Sergei Gnezdov

    type* name vs. type *name

    Sergei Gnezdov, Mar 29, 2005, in forum: C Programming
    Replies:
    5
    Views:
    291
    Gordon Burditt
    Mar 29, 2005
  3. JoeP

    Pass the name into HTM file

    JoeP, Mar 6, 2007, in forum: ASP .Net
    Replies:
    10
    Views:
    598
    Mark Rae
    Mar 8, 2007
  4. Gene Angelo
    Replies:
    1
    Views:
    121
    Robert Klemme
    Sep 15, 2010
  5. Replies:
    6
    Views:
    170
    Dr.Ruud
    Feb 6, 2007
Loading...

Share This Page