How to change start page?

Discussion in 'Site & Server Administration' started by skrachs, Feb 26, 2008.

  1. #1
    Now when you type in www .mydomain.com it opens index.html or index.php file in your browser. But how i can change it to other file?
     
    skrachs, Feb 26, 2008 IP
  2. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #2
    Look for the DirectoryIndex setting of your httpd.conf. This setting specifies which files will be used as index files and in which order.
     
    boltok, Feb 26, 2008 IP
  3. skrachs

    skrachs Peon

    Messages:
    1,791
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I don't have file like that in that page directory
     
    skrachs, Feb 26, 2008 IP
  4. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #4
    Its not there
    probably at /usr/local/apache/conf/
     
    buldozerceto, Feb 26, 2008 IP
  5. skrachs

    skrachs Peon

    Messages:
    1,791
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #5
    but wouldn't it change that setting for all my pages hosted with that hosting?
     
    skrachs, Feb 26, 2008 IP
  6. amazingronit

    amazingronit Well-Known Member

    Messages:
    1,334
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    #6
    upload a file named .htaccess (nothing before that dot (.)). write the following line in the file :

    DirectoryIndex required.html index.html index.php

    replace required.html with your own page name.

    Better write the line in a blank text file and then save it as .htaccess (not htaccess.txt !!!)
    Please give a green rep if it helps.
     
    amazingronit, Feb 26, 2008 IP
  7. Decipher442

    Decipher442 Well-Known Member

    Messages:
    1,299
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    140
    #7
    Try adding this to your .htaccess file...

    # serve alternate default index page
    DirectoryIndex yournewdefaultpage.html index.html index.php
     
    Decipher442, Feb 26, 2008 IP
  8. skrachs

    skrachs Peon

    Messages:
    1,791
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Redirect /index.html http://www.domain.com/file.html
    Code (markup):
    this one was that I need ;)
     
    skrachs, Feb 26, 2008 IP
  9. Decipher442

    Decipher442 Well-Known Member

    Messages:
    1,299
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    140
    #9
    yah but with that you are only redirecting it
     
    Decipher442, Feb 26, 2008 IP
  10. IndiaNets

    IndiaNets Guest

    Best Answers:
    0
    #10
    This is not the right way to do what you want.
    If you just need to redirect.. no need of this much also.

    Just put a line of code anywhere b/w <head> and </head> of index.htm/php to do this.
    <meta http-equiv="refresh" content="0;URL=http://domain.com/page.htm">
    Code (markup):
    But remember neither this nor you used are SEO friendly

    Thanks :)
     
    IndiaNets, Feb 26, 2008 IP
  11. skrachs

    skrachs Peon

    Messages:
    1,791
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I don't care about SEO in that page ;)
    The second variant you gave me is slower that first ;)
     
    skrachs, Feb 27, 2008 IP