We help IT Professionals succeed at work.

Interpreting files with different extensions

dht1
dht1 asked
on
How do you change the config so that PHP will interpret files with, say, a .HTML or .HTML extension?

Thanks,
David
Comment
Watch Question

Commented:
What web server do you use ??? If it is apache find line like this one in httpd.conf:
AddType application/x-httpd-php .php

and add .html or .whatever at the end

hope that helps

-milan
Commented:
This depends on what webserver you are using, it has to know what to do with a specific extension. On the one hand it should post .html files back to the client's browser, on the other hand it should start an interpreter for .php files for example.

Consequently, the solution depends on what webserver you are using. Fetak's comment is apache-related, if you are using IIS you have to change that in the management console.

Using the .html extension for php does work, tho i don't suggest it because it gets confusing if you have both static html files and dynamic html-generating php files running with the same extension.

Kind regards, weznme.

Author

Commented:
cheers

Explore More ContentExplore courses, solutions, and other research materials related to this topic.