Forum Moderators: phranque

Message Too Old, No Replies

saving redirected image yields .html extension

image redirected to php script

         

booyabazooka

8:49 pm on Apr 27, 2004 (gmt 0)

10+ Year Member



my .htaccess file redirects every gif request to a php script which modifies it. On my local Win2000 server, this works wonderfully.

The site just made its debut- on a Linux server. It still works, but whenever someone downloads a file, the default filename is "filename.gif.html"... this is a problem.

Is it fixable?

(see .htaccess file: [webmasterworld.com...] )

[edited by: jdMorgan at 10:03 pm (utc) on April 27, 2004]
[edit reason] Fixed link to previous thread [/edit]

jdMorgan

3:29 pm on Apr 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just a guess, but this sounds like the script does not add an appropriate MIME-type header to the files it outputs. Try using the Server Headers checker [webmasterworld.com] on one of your gif files, and see what MIME-type it says it is.

Jim

booyabazooka

12:36 am on Apr 30, 2004 (gmt 0)

10+ Year Member



Yes, the mime-type is text/html.

It seemed like a fairly simple thing to append .htaccess with:
<Files "secure.php">
ForceType image/gif
</Files>

However, when I do this, I get a website full of broken images...