How to change default index.htm to anything else?

Discussion in 'Site & Server Administration' started by bubaipal, Mar 26, 2008.

  1. #1
    Hello Guys
    How CAN I change default index.htm to anything else? Like home.htm. The server always takes to index as default page. How to change it?
    Thanks:)
     
    bubaipal, Mar 26, 2008 IP
  2. SSANZ

    SSANZ Peon

    Messages:
    861
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Edit your httpd.conf - search for DirectoryIndex - add home.htm

    The above is for a standard apache setup ( linux )
     
    SSANZ, Mar 26, 2008 IP
  3. bubaipal

    bubaipal Peon

    Messages:
    939
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Where is httpd.conf ?????
     
    bubaipal, Mar 26, 2008 IP
  4. titahost

    titahost Peon

    Messages:
    265
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    do one thing, you cna do this using Htaccess

    just add this line in .htaccess

    DirectoryIndex pagename.htm
    change the Pagename to the whatever name you want(home.htm or anything else.)
     
    titahost, Mar 26, 2008 IP
  5. SSANZ

    SSANZ Peon

    Messages:
    861
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    /usr/local/apache/conf/httpd.conf

    otherwise use locate e.g

    locate httpd.conf

    However, Titahost has an easier option - .htaccess
     
    SSANZ, Mar 26, 2008 IP
  6. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #6
    the exact location of the conf depend upon how you installed the apache.
    It may also be found in /etc/httpd/conf/httpd.conf .
    Be carefull when you edit these parameters because an error can cause the httpd from not getting restarted.
     
    maestria, Mar 26, 2008 IP