How to define a different file for the index of website

Discussion in 'HTML & Website Design' started by Carl29, Oct 28, 2010.

  1. #1
    how can I define a different file to show when people visit the website, instead of index.html.
    My client dont want a link to the index (home page), but the page must show when you visit the web.
    Thanks
     
    Carl29, Oct 28, 2010 IP
  2. ralphnsk

    ralphnsk Member

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    just add this to your .htaccess file:
    DirectoryIndex whateverpage.html
     
    ralphnsk, Oct 28, 2010 IP
  3. palme

    palme Active Member

    Messages:
    320
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #3
    the name of the first page of domain , are depend of , which language you use,
    index.htm, index.html, index.asp, index.php, default-asp, default.php and etc... if u use index.html u can write the link like:
    www.example.com OR www.example.com/index.html are the same.
     
    palme, Oct 28, 2010 IP
  4. wgn_white

    wgn_white Active Member

    Messages:
    130
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    73
    #4
    Hint: Splash page code.

    My assumption, you client don't want visitor to see index.html for the first time.

    But if they want to see the index.html, they still can do so.
     
    wgn_white, Oct 30, 2010 IP
  5. Nythe

    Nythe Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Like ralph stated, you can manually set this if you have access to the .htaccess file. If you don't there is another way you can do this. If your default page is, say, index.php, you can make it instantly redirect to the page you want to go to so that the user will only see the end page and not index.
    For example:
    <?PHP
    header("Location: otherpage.html");
    ?>

    If your default page is HTML and PHP is not supported, you can still use META REFRESH to redirect.
     
    Nythe, Oct 31, 2010 IP
  6. Carl29

    Carl29 Active Member

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #6
    Thanks guys
     
    Carl29, Nov 13, 2010 IP
  7. FuriousX

    FuriousX Active Member

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #7
    rename the file to index,and thats all
     
    FuriousX, Jan 12, 2011 IP