<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1047316" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1047316</link>
    <description></description>
    <language>en</language>
          <item>
    <title>That function sends the 404</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/adding-404-server-header-php#comment-1252339</link>
    <description> &lt;p&gt;That function sends the 404 message in the page &lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_HTTP_header_fields&quot;&gt;HTTP headers&lt;/a&gt;, not to be confused with your header template if you have one.&lt;/p&gt;
&lt;p&gt;My header() function can go anywhere in your code as long as you haven&#039;t sent anything to the browser yet.  If there is no way to call the header() statement before anything is printed, you may want to look into &lt;a href=&quot;http://php.net/manual/en/book.outcontrol.php&quot;&gt;output buffering&lt;/a&gt;.&lt;/p&gt;
 </description>
     <pubDate>Tue, 17 Aug 2010 01:22:45 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1252339 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Yes, I know that,
My problem</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/adding-404-server-header-php#comment-1251295</link>
    <description> &lt;p&gt;Yes, I know that,&lt;br /&gt;
My problem is that the header is included in all pages, with just one line which specifys the content for a server error (404) (code shown above), It therefore looks like its going to be quite complicated to achieve as I cant just 404 the main header because it will return a not found header for the entire site.&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Aug 2010 10:24:59 +0000</pubDate>
 <dc:creator>NickD</dc:creator>
 <guid isPermaLink="false">comment 1251295 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Headers usually go at the top</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/adding-404-server-header-php#comment-1251257</link>
    <description> &lt;p&gt;Headers usually go at the top of the file and have to be declared before any output.&lt;/p&gt;
&lt;p&gt;You can read more about it on the header function manual page:&lt;br /&gt;
&lt;a href=&quot;http://nz2.php.net/manual/en/function.header.php&quot; title=&quot;http://nz2.php.net/manual/en/function.header.php&quot;&gt;http://nz2.php.net/manual/en/function.header.php&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Aug 2010 21:52:00 +0000</pubDate>
 <dc:creator>Renegade</dc:creator>
 <guid isPermaLink="false">comment 1251257 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Want me to post the whole</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/adding-404-server-header-php#comment-1251256</link>
    <description> &lt;p&gt;Want me to post the whole header file?&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Aug 2010 17:57:26 +0000</pubDate>
 <dc:creator>NickD</dc:creator>
 <guid isPermaLink="false">comment 1251256 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hi programmer,
How is the</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/adding-404-server-header-php#comment-1251255</link>
    <description> &lt;p&gt;Hi programmer,&lt;/p&gt;
&lt;p&gt;How is the above integrated into&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$error404 = &amp;#039;&amp;lt;p style=&amp;quot;font-size:15px;font-weight:bold;&amp;quot;&amp;gt;Error 404 - page does not exist&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Contact the &amp;lt;a href=&amp;quot;mailto:&amp;#039;.$row_site_control[&amp;#039;mailto&amp;#039;].&amp;#039;&amp;quot;&amp;gt;systems administrator&amp;lt;/a&amp;gt; to report this&amp;lt;/p&amp;gt;&amp;#039;;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
so that the 404 server header only affects the 404 page?&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Aug 2010 17:46:07 +0000</pubDate>
 <dc:creator>NickD</dc:creator>
 <guid isPermaLink="false">comment 1251255 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>This code should work for</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/adding-404-server-header-php#comment-1251254</link>
    <description> &lt;p&gt;This code should work for you:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;HTTP/1.0 404 Not Found&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Aug 2010 16:45:56 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1251254 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
