<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >DefaultContentType</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="mnoGoSearch 3.3.9 reference manual" HREF="index.html"><LINK REL="UP" TITLE="mnoGoSearch command reference" HREF="msearch-cmdref.html"><LINK REL="PREVIOUS" TITLE="DBAddr" HREF="msearch-cmdref-dbaddr.html"><LINK REL="NEXT" TITLE="Dehyphenate" HREF="msearch-cmdref-dehyphenate.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="mnogo.css"><META NAME="Description" CONTENT="mnoGoSearch - Full Featured Web site Open Source Search Engine Software over the Internet and Intranet Web Sites Based on SQL Database. It is a Free search software covered by GNU license."><META NAME="Keywords" CONTENT="shareware, freeware, download, internet, unix, utilities, search engine, text retrieval, knowledge retrieval, text search, information retrieval, database search, mining, intranet, webserver, index, spider, filesearch, meta, free, open source, full-text, udmsearch, website, find, opensource, search, searching, software, udmsearch, engine, indexing, system, web, ftp, http, cgi, php, SQL, MySQL, database, php3, FreeBSD, Linux, Unix, mnoGoSearch, MacOS X, Mac OS X, Windows, 2000, NT, 95, 98, GNU, GPL, url, grabbing"></HEAD ><BODY CLASS="refentry" BGCOLOR="#EEEEEE" TEXT="#000000" LINK="#000080" VLINK="#800080" ALINK="#FF0000" ><!--#include virtual="body-before.html"--><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" ><SPAN CLASS="application" >mnoGoSearch</SPAN > 3.3.9 reference manual: Full-featured search engine software</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="msearch-cmdref-dbaddr.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="msearch-cmdref-dehyphenate.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="cmdref-defaultcontenttype" ></A >DefaultContentType</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN8638" ></A ><H2 >Name</H2 ><B CLASS="command" >DefaultContentType</B > -- defines default Content-Type<P ><B ></B ><TT CLASS="filename" >search.htm</TT ></P ></DIV ><DIV CLASS="refsynopsisdiv" ><A NAME="AEN8644" ></A ><H2 >Synopsis</H2 ><P ><B CLASS="command" >DefaultContentType</B > {type}</P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN8648" ></A ><H2 >Description</H2 ><P > <B CLASS="command" >DefaultContentType</B > is useful when the <TT CLASS="literal" >Content-Type</TT > header is not configured using a <A HREF="msearch-cmdref-section.html" >Section</A > command in <TT CLASS="filename" >indexer.conf</TT > and thus is not stored in the database. </P ><P > When generating excerpts from a <SPAN CLASS="emphasis" ><I CLASS="emphasis" >Cached Copy</I ></SPAN >, <SPAN CLASS="application" >search.cgi</SPAN > tries first to fetch <TT CLASS="literal" >Content-Type</TT > information from the database. If no information is found, <SPAN CLASS="application" >search.cgi</SPAN > tries to detect <TT CLASS="literal" >Content-Type</TT > automatically using some well-know substrings like <PRE CLASS="programlisting" ><HTML</PRE > or <PRE CLASS="programlisting" ><!DOCTYPE HTML</PRE > in the beginning of the document, unpacked from the <SPAN CLASS="emphasis" ><I CLASS="emphasis" >Cached Copy</I ></SPAN >. </P ><P > If automatic guesser fails to detect the document type, it chooses <TT CLASS="literal" >text/plain</TT > by default. With help of <B CLASS="command" >DefaultContentType</B > you can change the default type, for example, to <TT CLASS="literal" >text/html</TT > or <TT CLASS="literal" >text/xml</TT >. However, the better idea (if you use <SPAN CLASS="emphasis" ><I CLASS="emphasis" >Cached Copies</I ></SPAN >) is to activate storing <TT CLASS="literal" >Content-Type</TT > using a proper <A HREF="msearch-cmdref-section.html" >Section</A > command in <TT CLASS="filename" >indexer.conf</TT >. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN8673" ></A ><H2 >Examples</H2 ><DIV CLASS="informalexample" ><P ></P ><A NAME="AEN8675" ></A ><PRE CLASS="programlisting" > DefaultContentType text/html </PRE ><P ></P ></DIV ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN8677" ></A ><H2 >See also</H2 ><P > <A HREF="msearch-cmdref-addtype.html" >AddType</A >, <A HREF="msearch-cmdref-mime.html" >Mime</A >, <A HREF="msearch-cmdref-useremotecontenttype.html" >UseRemoteContentType</A >, <A HREF="msearch-stored.html" >the Section called <I >Cached copies <A NAME="AEN2074" ></A ></I > in Chapter 3</A >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="msearch-cmdref-dbaddr.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="msearch-cmdref-dehyphenate.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >DBAddr</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="msearch-cmdref.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Dehyphenate</TD ></TR ></TABLE ></DIV ><!--#include virtual="body-after.html"--></BODY ></HTML >