Hi,
My site is hosted on a linux server running apache.
The site is hosted in the virtual hosts mode.
I would like to configure my virtual host settings so that all my .htm , .html files also open with php

I want this setting to apply only to my website & not to all websited hosted on the server
I have tried this on windows & it works
I am sure there must be a way to implement this in Apache.
Someone Please help me out
Its pretty important
Thanx in Advance
Sanket

    Two options:
    add the folowing line to httpd.conf, within the virtual host container:
    AddType application/x-httpd-php .htm .html
    Or, create a .htaccess file in the document root of your virtual host containing the same line.
    If you're using PHP3 then use
    AddType application/x-httpd-php3 .htm .html

    Sander

      Can you explain a bit more

        If you have root access to the server then you should be able to modify the

        AddType application/x-httpd-php .php .htm .html

        directive in the httpd.conf file to include the extensions you want.

        If you do not have root access to this file then you can create an .htaccess file in your web root with the AddType line in it just like above.

        This is a pretty cool feature of Apache, as you can override a lot of the default directives on a per directory basis.

          Write a Reply...