homepage Welcome to WebmasterWorld Guest from 54.197.183.230
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Setting MIME types, not via file extensions
mfagan

10+ Year Member



 
Msg#: 683 posted 6:49 pm on Dec 4, 2003 (gmt 0)

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

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



 
Msg#: 683 posted 8:51 pm on Dec 4, 2003 (gmt 0)

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

10+ Year Member



 
Msg#: 683 posted 12:04 am on Dec 5, 2003 (gmt 0)

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

Naturally I overlooked the obvious. Thanks.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved