making main.php my default file instead of index.html/index.php

Discussion in 'Apache' started by Psychotomus1, Sep 1, 2007.

  1. #1
    how can I do taht?
     
    Psychotomus1, Sep 1, 2007 IP
  2. Bryce

    Bryce Peon

    Messages:
    1,235
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #2
    #1 - You can edit your .htaccess file and put this in it

    DirectoryIndex main.html

    #2 - Just do a 301 redirect in PHP in your index.php file

    <?php
    // Permanent redirection
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: http://www.mysite.com/main.php");
    exit();
    ?>
     
    Bryce, Sep 1, 2007 IP
  3. Psychotomus1

    Psychotomus1 Banned

    Messages:
    411
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks.

    Sim
     
    Psychotomus1, Sep 2, 2007 IP