« Back to IP Phone Services Questions

How do I set the Content Type header

Combination View Flat View Tree View
Threads [ Previous | Next ]
I am using the Apache Webserver to host XML applications for the IP-Phones. How do I set the Content Type header on the pages that are served?

If you wish to serve static XML files with the .xml extension, text/xml should already be in mime.types file. Otherwise, you can add the following to httpd.conf:

AddType text/xml .xml

see: http://httpd.apache.org/docs/mod/mod_mime.html

If you are going to implement dynamic pages using PHP, then it's up to the PHP script to output the content type:

header("Content-type: text/xml");

see: http://www.php.net/manual/en/function.header.php