Hello All,

I'm not sure if this is the right place to put this, I apologise for it any way.

Okay so here it is, I have a sitemap file sitemap.xml and I have PHP code inside it. The problem I am having is when adding the following lines:

#AddHandler application/x-httpd-php .php .xml
or
#AddHandler x-httpd-php .php .xml

This forces the browser to download the files, this is not the desired outcome what should happen is apache tells PHP to parse the PHP code in the xml document and then display the results.

Please can someone help me with this.

Apache won't recognize the module to be a php module unless you give it a .php suffix. Thus, it won't get parsed.

This is what this line is supposed to change it's supposed to make PHP parse the contents of the file...

I hope you are writing this data to an .htaccess file...

of course... :D

It's likely then that your host disabled .htaccess override.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.