There are three ways to do this that I can think of.

1.) The first is the most effective but also requires access to the apache config file:

Find the line that reads:
DirectoryIndex index.html

Change it to read
DirectoryIndex index.html index.php

As always when working with a config file. Save a backup of the file before doing the changes.

2.) Add A Meta Redirect or a Javascript Redirect inside of the index.html file.
This Option will work for any server but does not always work on older browsers and browsers that have javascript turned off.

3.) Create a .htaccess file in your root web directory and put the following line into it.

DirectoryIndex index.php

This option should work for that directory and any directories inside of that dir. You need apache for this option to work.

Jonathan Pitcher
Capitol Federal Savings Webmaster

On Wednesday, February 5, 2003, at 11:15 AM, Alberto Brea wrote:

Dear list,
My home page is index.html, that doesn't run PHP.
I also have index.php which shows the same content with PHP.
Can I do to automatically redirect a visitor from index.html to index.php?
TIA

Alberto

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to