Broadband
Dial-Up
Email
Hosting
Wireless
Security
Useful Tools
Quick Reference
Contact Us
Customer Portal
Site Search

Zen Internet Support Forum

Welcome to the Zen Internet community support forums.

Before posting we recommend you search our
extensive Knowledge Base or the forum archives
as an answer to your query may already be available.

Welcome to Zen Internet Support Forum Sign in | Join | Help
Forums Forum Rules

AddType in .htaccess

  •  11-08-2008, 9:19 PM

    AddType in .htaccess

    Hello,

    I am trying to force apache to parse files with a .xml extension as php script (I am generating xml files dynamically). While developing the website on my own machine I simply edited httpd.conf and added:

    AddType application/x-httpd-php .xml
    This worked perfectly fine, but when it came to uploading the website to the hosting server I obviously don't have direct access to the apache config file, so I added a .htaccess file to the directory with the .xml file I wish to parse as php. The .htaccess file consists of the following:
    AddType application/x-httpd-php .xml
    AddHandler application/x-httpd-php .xml
    This does not work. It is instead causing the browser to bring up a download window for the file (this also happens when trying to parse .htm/.html files as php scripts). I have tried every combination of the the two above statements, all have failed. I know Apache is checking .htaccess files as simple authentication can be set up quite easily. The conclusion I am forced to draw is that Apache is configured to ignore AddType and other such statements. I am hoping someone can shed some light on this, or even provide a solution, before I contact technical support. Thank you for your time. Charles Whatley
    Filed under: ,
View Complete Thread