PDA

View Full Version : Custom Extensions


JordanW
06-18-2008, 07:31 PM
Quick question would anything be able to stop the use of

AddType application/x-httpd-php .do

To parse a .do file as PHP. I.e. does the server need to be configured in anyway to allow custom MIME Types like this.



The above line is in my htaccess file, but it won't do anything it just prompts to download my .do file. The contents is purely:


<?php
echo "Hello World";
?>


And can be found here:
http://www.interactivesmedia.info/test.do



Thanks,
Jordan

demtron
07-01-2008, 11:17 PM
You need to configure the server to tell it how the file with that extension will be handled. If you use shared hosting, you'll need to ask the hosting company whether they allow alternate extensions to be handled like PHP. As it stands, that extension is sent as plain data to the browser so that the browser must interpret what to do with it.

Good luck!