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.

index.htm

Discussion in 'General Discussion' started by JimboW, Mar 14, 2005.

  1. JimboW

    JimboW Registered

    Joined:
    Mar 14, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
  2. JimboW

    JimboW Registered

    Joined:
    Mar 14, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    No worries people, Monday morning brain means I hadn't put the files in the www folder.

    :rolleyes:
     
  3. ehpmahesh

    ehpmahesh Well-Known Member

    Joined:
    Jul 3, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Dont warry be default it will go to index.htm or index.html. By default in your Server Apache configuration file Directory Index is set to index.html. So whenever any one type your domain name it will go to index.html. :)
     
  4. viip911

    viip911 Registered

    Joined:
    Aug 16, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Default folder as index

    I am a long time Cpanel user and always stuck with this question:
    HOW DO I CHOOSE A FOLDER TO BE MY DEFAULT INDEX??
    EX WWW.MYSITE.COM==> IS THE DEFAULT
    I WANT TO PUT WWW.MYSITE.COM/FOLDER AS THE DEFAULT FOLDER

    PLEASE HELP.
     
  5. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    There are two ways I can think of for setting the default folder: modifying httpd.conf or using a script-based redirect (e.g. PHP).

    If you edit /usr/local/apache/conf/httpd.conf and modify the correct VirtualHost section as follows:

    Code:
    <VirtualHost 123.123.123.123>
    ServerAlias www.example.com example.com
    ...
    #DocumentRoot /home/example/public_html
    DocumentRoot /home/example/public_html/folder
    ...
    </VirtualHost>
    where ... indicates existing lines that are not relevant to this post and should be left as they are

    Or put the following in a file named index.php at http://www.example.com/index.php

    Code:
    <?php
    header ("Location: ".$_SERVER['HTTP_HOST']."/folder/");
    
    ?>
    I've never tried modifying httpd.conf like this, but I reckon it might work.
     
    #5 webignition, Mar 16, 2005
    Last edited: Mar 16, 2005
  6. ehpmahesh

    ehpmahesh Well-Known Member

    Joined:
    Jul 3, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    You can do this by one another way also. Just login to your Cpanel there you find redirection option using this you can redirect where you want. Check this :)
     
  7. viip911

    viip911 Registered

    Joined:
    Aug 16, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
  8. ChrisRiley

    ChrisRiley Member

    Joined:
    Apr 11, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I am moving to cPanel from Webmin (and emacs/vi :) ) where it was easy to locate the virtual host controls like picking the default index file name. Where do you set the order to check for files - e.g. index.php before index.shtml for example.

    I think it is just a matter of getting used to where things are - like changing index.html to index.php and other virutal host controls. I could edit by hand, but am attempting to get away from that!

    Any pointers are of course welcome.

    Thanks
     
    #8 ChrisRiley, Apr 12, 2005
    Last edited: Apr 12, 2005
Loading...

Share This Page