How to redirect the home page on the domain name without filename?

What I would like, is the URL ashttp://www.scriptol.fr/index.html
be redirected by the server tohttp://www.scriptol.fr/
to prevent robots from search engines do see two different URLs where there is only one.

In this case, we will use the PHP environment variable REQUEST_URI which indicates which page has been requested to the server. Then we use a load command, as in the following example:

<?php
 if(eregi('index.(html|php)', $_SERVER['REQUEST_URI'])) 
 { 
  header('HTTP/1.1 301 Moved Permanently'); 
  header('Location: http://www.scriptol.com/'); 
 } 
?>

We checked with the function eregi that the loaded page is index.php or index.html (or any other name) and only in such cases is made the redirection.

Another option is to rename the home page, home.html for example, and define it as home page with the following command in .htaccess:

DirectoryIndex home.html

See also...