Welcome to WebmasterWorld Guest from 54.145.44.134

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Setting MIME types, not via file extensions

     

mfagan

6:49 pm on Dec 4, 2003 (gmt 0)

10+ Year Member



Anyone know how to set a file's MIME type, if the file is not using a file extension. For example, I want [example.com...] to have a different MIME type, possibly using .htaccess (which I understand slightly).

Help greatly appreciated.

jdMorgan

8:51 pm on Dec 4, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If you are using RewriteRules to redirect that URL to a real page or script, you can append the [T] flag to force the MIME-type -- see the documentation on RewriteRule flags. Another alternative would be to have the script generate all the HTTP response headers, including the MIME-type.

Without any filename or a file extension to 'grab on to', I don't see any other obvious options. (Someone else might, though).

Jim

mfagan

12:04 am on Dec 5, 2003 (gmt 0)

10+ Year Member



Another alternative would be to have the script generate all the HTTP response headers, including the MIME-type.

Naturally I overlooked the obvious. Thanks.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month