Find the answer to your Linux question:
Results 1 to 4 of 4
hi guys. i just wanted to know how i can make my index.htm inside a subfolder automatically opened when accessed via web browsers. example, in my web root, i have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! aenguillo's Avatar
    Join Date
    Dec 2006
    Location
    philippines
    Posts
    40

    apache subfolders


    hi guys. i just wanted to know how i can make my index.htm inside a subfolder automatically opened when accessed via web browsers. example, in my web root, i have a "task" folder. in that folder, there is index.htm. when i access it via web (typing the url) http://www.mysite.com/task, i want the index.htm file be opened automatically. because when i try it, using the same url, it only opens a list of files contained in the folder.
    thanks guys

  2. #2
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    On my system, simply changing index.htm to index.html did the trick. One would presume that there's a setting in a config file that lets you specify that .htm should be treated the same as .html, but I can't see it right off the bat. If you're concerned about keeping file names restricted to the 8.3 format, you can make index.html a link to index.htm.
    Stand up and be counted as a Linux user!

  3. #3
    Just Joined! aenguillo's Avatar
    Join Date
    Dec 2006
    Location
    philippines
    Posts
    40
    yes sir, i have done that. this is how the webroot structure looks like:

    the webroot directory contains files and folders. it has index.htm. when i type the url in the web browser's address field: http://www.mysite.com/, my index.htm automatically opens. so i have no problem with that.
    now, in the webroot directory, i have a folder named task. task folder also contains webpages and one of those is another index.htm. now when i type http://www.mysite.com/task/ the browser presents me a list of files inside the task folder. what i wanted to happen is that, it should open automatically the index.htm contained in that folder.

    thanks.

  4. #4
    Just Joined! aenguillo's Avatar
    Join Date
    Dec 2006
    Location
    philippines
    Posts
    40
    you were right sir. i forgot to put index.htm in the conf file. thanks a lot.

Posting Permissions

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