Forum Moderators: phranque

Message Too Old, No Replies

.php to .img

         

FiRe

11:09 pm on Jun 18, 2006 (gmt 0)

10+ Year Member



I have this in a .htaccess file:

AddType x-httpd-php .img

If I use application/x-httpd-php for some reason it doesnt work (could be because I am on a shared server).

Anyways if I go to file.img all I see is the actual PHP source code. Anyways to fix this?

jdMorgan

3:10 am on Jun 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not clear what you're trying to do, but you've explicity told the server to send .img files requested by the client (browser) with a MIME-type of "application," which means the browser should use a plug-in or program (e.g. media player or other browser-registered handler) to open the file, rather than rendering it within the browser.

So, your server's doing just what you told it to do.

Jim

FiRe

9:22 am on Jun 19, 2006 (gmt 0)

10+ Year Member



No the "x-httpd-php" should tell it to treat it as a php file right?

jdMorgan

12:40 pm on Jun 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, sorry, AddType sets the MIME-type, as stated.

You want AddHandler [httpd.apache.org], not AddType [httpd.apache.org].

Jim