If I have both an index.html and an index.php in my root directory "public_html". Will the index.html file always show when someone visits the web site. Does index html trump index php as first choice page display? Why I'm asking is because I'm installing a php script onto an existing web site that has static pages and constant visitors. This php script is one where you go through the setup install by going to www.website.com/index.php. My inital problem was how do run the setup script for the config connects etc. If all of the usual visiters see the index.php before I get to it to run it there could be probs. The site is active and I was worried that anyone could start pressing whatever setup steps buttons before I got to it and then mess it up. I thought of password protecting the entire public_html directory to let me have the 5 minutes necessary to install the script but if index.html always shows first to index.php then I have no problem and can connect to index.php to trigger the setup/install process behind the scenes and then after the install I simply delete the original index.html. Would that work ok?
it depends on the setting of your site. you can ask your hosting company to verify if it follow index.html over other default document.
Paradox, That should work fine. Usually the webserver if (apache) has index.html as the first file to call when a request is sent to the folder. So having that in there should always bring up the html file before the php. Then just remove the html file when your ready like you said.
Daniel: You need to have a look at your home page for http://thor.zynetonline.com/ at 800x600 -- your frames are messed up so the left login column is cut off at the right, and the italics-lightening bolt font on the graphics in the right hand pane are almost illegible.
Hehehehe I know Minstrel Thanks for the feedback. The site is going under a complete face lift and will look much better especially after Kalina designs the front end I know how to code in perl much better than design in photoshop Thanks again for the advice keep it coming ! By the way Nice to meet a fellow Ottawaian! hehehe
Depending on the server or how it is configured, the hierarchy of "default" pages will vary, generally among index.html, default.html, or home.html (or their cousins index.htm, default.htm, or home.htm), but as Daniel said I don't think I've ever seen one where the default was index.php...
Its really easy for the SERVER ADMIN to change in the config file. something like /usr/local/apache2/conf/httpd.conf the line is easy to find and I think. Im not sure but I think the first file listed will be the one to take default hmmmm let me find the line. This is how I configure my web servers. DirectoryIndex index.html index.htm index.php index.pl index.cgi As you can see index.html is stated first so it would be the default index file. If I mod to this DirectoryIndex index.php index.html index.htm index.pl index.cgi then php would be the default.
Minstrel, your forums are pretty cool, I know our sites are not related but we can still trade resources if you'd like. Mike
Failing access to your conf file, you can force your home page to be whatever you want it to be by inserting DirectoryIndex default.php Code (markup): in an .htaccess file and put it in your root directory replace default.php with what ever your file is called that you want to be the home page
as long as the links on index.html are right and lead to the right php pages, you can always optimize a php site in html just like html