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.

Choosing preference between index.html & default.html etc

Discussion in 'General Discussion' started by thedjmixman, Apr 27, 2004.

  1. thedjmixman

    thedjmixman Registered

    Joined:
    Apr 27, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kent, UK
    I thought that I saw this quite a while ago???, but cant find it now that I need it lol.

    Is it possible to change the order of which the server looks for the default page? I have a certain site that requires default.php to be the home page, but I also need index.php to be in the same directory ;)

    Many thanks,
    Chris
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    For server wide changes, you can modify the httpd.conf file. The part to modify looks something like:
    <IfModule mod_dir.c>
    DirectoryIndex index.pws index.html index.wml index.cgi index.pl index.ms index.shtml index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml index.htm default.htm default.html home.htm home.html
    </IfModule>


    It won't be quite the same since mine is modified. The file is normally in the /usr/local/apache/conf/ directory.
     
  3. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    I am sure you could make a .htaccess file of some sort to do this . . . .
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Might be possible to use .htaccess for 1 site only, but I'm not sure how it would be done.
     
  5. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    For server wide changes, place that into your httpd.conf file. For domain or folder only level changes, place that into your htaccess file.

    That "should" work.
     
  6. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    oops, quoted wrong guy :p lol sorry
     
  7. thedjmixman

    thedjmixman Registered

    Joined:
    Apr 27, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kent, UK
    Thank you very much for your help!! :)
     
  8. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    quit welcome my man, quit welcome.
     
Loading...

Share This Page