The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DirectoryIndex command

Discussion in 'General Discussion' started by mumbles27, Apr 7, 2010.

  1. mumbles27

    mumbles27 Active Member

    Joined:
    Aug 22, 2006
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    England
    Hi Forum


    i am told that i can set the DirectoryIndex command in my cPanel. is this right?

    dont know a great deal about this but i have a site that defaults to index.html and iwant it to default to index.php. i have changed a .htaccess file but it doesnt see mto work.

    Am i doing something wrong?

    Wondering if i can set in cPanel whether icant find it and its overriding my .htaccess file?

    or is it the wrong .htaccess file? its the one in public_html


    Andi
     
  2. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Indiana, USA
    The setting is set in the httpd.conf and the provider would need to make the change for you.
     
  3. mumbles27

    mumbles27 Active Member

    Joined:
    Aug 22, 2006
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    England
    "Provider"?

    i am the reseller, can i do it?
     
  4. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Indiana, USA
    Provider - being the one that gives you access to the server. Unless you have root access - you wouldn't be able to do it as it's a server-wide setting.
     
  5. mumbles27

    mumbles27 Active Member

    Joined:
    Aug 22, 2006
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    England
    hmmm, ok thank you MikeDVB, i'm not too hot on this, i'll bear in mind to find out more when not snowed under. Thank you for your help...
     
  6. freedog96150

    freedog96150 Well-Known Member

    Joined:
    Mar 25, 2005
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Nevada, USA
    You can always just place the DirectoryIndex directive inside a .htaccess file in the appropriate directory. Remember that .htaccess directives cascade down to all sub directories, so you can control where the directive starts by where you place it. For sitewide effects, put the directive at your web roots .htaccess file.

    I use this all the time with my e-learning sites. Articulate outputs files with player.html as the initial file. I simply place the following line in the .htaccess file in my elearning folders - DirectoryIndex player.html - and any file with the name player.html loads first. Simple!

    If you are looking to change the directive for ALL your reseller accounts, then that will not happen unless you talk with your provider and request a server-wide change. Why you would want to do that is beyond me....
     
Loading...

Share This Page