Thursday, March 5, 2009

Setup apache to serve xml files.

Apache by default is configured to serve html files, if you want to setup Apache to serve other files then you have to edit the "httpd.conf" file. This file is usually located in your apache installation folder conf directory, open the file using notepad search for the following tag "<IfModule mime_module>" within this tag you have to tell apache to serve other content types, you have to add the new type that you want to publish with the following values

    AddType application/xhtml+xml .xhtml .xml

    AddEncoding xhtml xml

The first variable defines the type of media and the second tell the encoding that you want to use, this will instruct the browser to handle these media types respectively. For a list of registered media types see here.


6 comments:

  1. The XML file extension similar to the HTML extension represents a XML web file. XML files are shown on the Internet; however they can also be saved on a computer and displayed as documents. Take a look: xml file

    ReplyDelete
  2. I enjoy what you guys are usually up too. This sort of clever work and coverage! Keep up the wonderful works guys I’ve added you guys to my blogroll.
    Pixelstyle

    ReplyDelete
  3. What’s up to every one, as I am in fact eager of reading this web site’s post to be updated regularly. It includes nice stuff.
    SEO in Toronto

    ReplyDelete
  4. Such are in fact cool YouTube movies, its my luck to go to see this web page and finding these awesome YouTube movies.League of Legends Boosting

    ReplyDelete
  5. I acknowledge there are various more pleasurable open entryways ahead for individuals that looked site.Boosting lol

    ReplyDelete
  6. Basically wish to say your article is as stunning. The clarity in your post is essentially exceptional and i could expect you are an authority on this subject. Well with your agree let me to grab your RSS channel to keep redesigned with foreseen post. You shake and please keep up the wonderful work.Server Hosting Singapore

    ReplyDelete