Sleep! what's that?
johnw wrote:...well i havent tried it yet as i was on my way to get some sleep,but if it was the index.php then it was my mistake...
but let me ask you,under normal server enviroments wouldnt the .html show before the .php as standard ?
anyway,ill post back in the morning..thank you
It was not the index.php at fault if you included index.html in the address bar but rather the incorrect address in the first place.
should have been
(your path here and index.php until you change it - see below
will give you the same page.
Rename the index.php to index.php.bak and place your index.html in C:\xampp\htdocs and now the address becomes:
will give the same default index page
Now the order that the server picks up the index file in a directory is determined in:
Open this file in your favorite text editor
(notepad for example - I use NotTab Pro - not wordpad or any other MS Word type of editor
Look for line about 235 in the httpd.conf file:
- Code: Select all
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
(The above order may not be the default as I may have changed mine at some time or other. Also, the slash /, at the end of an address http://localhost/, Apache interprets as a directory request
As you can see it is possible to change the order of these index files to suit your needs and also to be able to add or delete when needed.
Apache will look for the first index file in a directory in the order they are in the above list.
So if there is an index.php then Apache will load it, if not Apache will load the index.php4 if it finds it and so on.
And in your case if Apache finds the index.php first it will be loaded before the index.html.
If there is only an index.html in the above list then Apache will load it, if that index.html file is in a directory.
, All directories should have an index file even if that index file is blank as this technique prevents 'directory snooping' and can be deemed to enhance your web site security.
Keeping the original list intact and knowing how Apache works that list, should present no problems for you in the future.
, If you change it and put the index.html first then there would be no need to rename the index.php as Apache would ignore it and load the index.html because the index.html now comes before the index.php in your edited list.
, if you will never use any of the above except index.php and/or index.html then it would be fairly safe to delete the rest but as I always stipulate you should make a back up of any configuration file before making any changes.
You will then have your original working copy to fall back on if you make a syntax error (typo).
Save the configuration file and then always restart Apache to have those changes take effect.
I hope this will help clear up this issue for you and for others who may stumble upon this thread.
Take a look at the new DeskTopXampp
launch control for XAMPP
(DTX.exe) posted by ridgewood
http://community.apachefriends.org/f/viewtopi ... 967#103967
Available at Ridgewood's new
DTX web site http://zedfiles.com/DTX/
Also available here: http://nat32.com/dtx/
I highly recommend DTX.