Redirect

Discussion in 'PHP' started by westen, Jan 8, 2008.

  1. #1
    When someone types in the root url of my website index.html is displayed, I would like index.php to displayed. Could someone tell me how I can do this?

    Thanks a lot for your help,
    Westen
     
    westen, Jan 8, 2008 IP
  2. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #2
    just delete index.html
     
    Kaizoku, Jan 8, 2008 IP
  3. BrianCox

    BrianCox Banned

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Or rename your html file, otherwise if you need to keep it for some reason, do a meta refresh redirect
     
    BrianCox, Jan 8, 2008 IP
  4. Dr. XYZ

    Dr. XYZ Guest

    Messages:
    226
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Add to your .htaccess file the following line

    
    DirectoryIndex index.php index.html index.shtml  
    
    Code (markup):
    Your server will read index.php, if not available the following extension and so on.

    ·​
     
    Dr. XYZ, Jan 8, 2008 IP