Results 1 to 3 of 3

Thread: Changing the Default File

  1. #1
    Join Date
    Dec 2005
    Posts
    12

    Default Changing the Default File

    When a URL specifying only a directory is requested ...
    eg.: http://www.domain.com/directory/

    ... Apache looks for file names by default (in the order they appear):

    index.html
    index.htm
    home.html
    welcome.html

    The .htaccess directive "DirectoryIndex" can be used to override this behavior. In your .htaccess file, type the following line:

    DirectoryIndex index.php index.html

    In the above example Apache is forced to look for index.php first and look for index.html only if there is no index.php file present.

    "DirectoryIndex" can be used to make any file you would like to appear as default. For instance, you could have:

    DirectoryIndex firstpage.html first.html first.php

    In the above example the web server would first look for firstpage.html, first.html, and first.php, returning a directory listing if none of those files were present in the directory.

  2. #2
    Join Date
    Jan 2012
    Posts
    5

    Default

    I have found in the past that this will default back to .docx files for no apparent reason. perhaps this has been fixed in a service pack as I have not seen the action in the last few weeks but it was bad earlier this year where it would default back to .docx and I would have to do these steps to have it default back to .doc.

  3. #3
    Join Date
    Nov 2010
    Posts
    119

    Default

    Quote Originally Posted by evantanski View Post
    I have found in the past that this will default back to .docx files for no apparent reason. perhaps this has been fixed in a service pack as I have not seen the action in the last few weeks but it was bad earlier this year where it would default back to .docx and I would have to do these steps to have it default back to .doc.
    Well evantanski, I surprised to see you replying to a more that 5 year old post, Don't you think that the technology has changes very much during this big gap?

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
  •