Koozali.org: home of the SME Server

Default MIME type

Offline bcliburn

  • ***
  • 41
  • +0/-0
Default MIME type
« on: March 18, 2006, 04:13:10 PM »
How do I change the default mime type to .php?  Is there a way to have the server look for .php and if not found look for .html then .htm etc?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Default MIME type
« Reply #1 on: March 19, 2006, 11:20:14 AM »
Quote from: "bcliburn"
How do I change the default mime type to .php?  Is there a way to have the server look for .php and if not found look for .html then .htm etc?


You can specify a default mime type in Apache (i don't know if this is sensible to do however), may be it is better/easier to add/modify the DirectoryIndex to specify which file(s) and in which order Apache should look for when it is trying to display the url.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Default MIME type
« Reply #2 on: March 19, 2006, 08:57:38 PM »
Quote from: "bcliburn"
How do I change the default mime type to .php?  Is there a way to have the server look for .php and if not found look for .html then .htm etc?


If dynamic content in enabled for an i-bay, then apache already searches for index.php and then index.html, then index.htm.

Offline bcliburn

  • ***
  • 41
  • +0/-0
Default MIME type
« Reply #3 on: March 20, 2006, 06:43:13 AM »
Cool thanks, I guess I'm still used to using m$ servers and having to manually add .php I took out the index.html and it works fine now.  :pint: