Page 1 of 1

Using an html ext instead of a php ext problem

PostPosted: 19. December 2007 11:08
by Recycling
How do I change the settings so that the html ext is used instead of the php ext on my dev computer running XAMPP?

I have tried adding 'addtype application/x-httpd-php .html' to the http.conf file. I have also tried using a .htaccess in the localhost root. But to no joy.

Can anyone help please?

Merry Xmas

Recycling

PostPosted: 19. December 2007 11:48
by Izzy
Find these lines in the httpd.conf file and change the order so index.html or index.htm are the first entries in the line:
Code: Select all
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.phtml index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml
</IfModule>

The above order is from my httpd.conf file so yours may be different with index.php being the first in the line perhaps.

Save the file and restart Apache - don't forget to always make a back up of ini and conf files before editing.

BTW - Apache will load the first index file in the above order it finds in the Directory.
So if you don't want an index.php loaded, delete or rename it (index_original.php for example)and add your index.html in its place then there is no need to mess with the httpd.conf file also I have never known a need to have more than 1 index files in the same directory.


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 19. December 2007 12:27
by Recycling
Yes! Thanks for that