<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The importance of error pages …</title>
	<atom:link href="http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/</link>
	<description>Ramblings of a web designer / developer</description>
	<lastBuildDate>Sat, 27 Mar 2010 15:49:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Internet Marketing in Manchester</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-113</link>
		<dc:creator>Internet Marketing in Manchester</dc:creator>
		<pubDate>Sat, 27 Mar 2010 15:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-113</guid>
		<description>Hi Kirsty,

firstly may i say this is a great post and i&#039;ve pointed a few people towards it.

my view on error pages is this:

if you can be creative and do something unique do so... if you have a common error occuring (eg someone is going to /working rather than /work use a 301 redirect as its likely someone has put the link in their text wrong, also use 301&#039;s for typos of words like /wark to /work ... if you can&#039;t be creative or be bothered with about 50 forwards per site simply put your error to point to a sitemap or your homepage (maybe use a little bubble saying sorry there was an error try navigating from here to the page you want to see). 

andykinsey.co.uk returns home for most errors and there are 3 or 4 forwards from old page names &amp; common typo&#039;s 

another then to use 301&#039;s for is simply if you change your site structure to redirect traffic from external links to the new relevant page, without loosing any link juice!

301 - permanent redirect
301 - temp redirect

nice post.</description>
		<content:encoded><![CDATA[<p>Hi Kirsty,</p>
<p>firstly may i say this is a great post and i&#8217;ve pointed a few people towards it.</p>
<p>my view on error pages is this:</p>
<p>if you can be creative and do something unique do so&#8230; if you have a common error occuring (eg someone is going to /working rather than /work use a 301 redirect as its likely someone has put the link in their text wrong, also use 301&#8217;s for typos of words like /wark to /work &#8230; if you can&#8217;t be creative or be bothered with about 50 forwards per site simply put your error to point to a sitemap or your homepage (maybe use a little bubble saying sorry there was an error try navigating from here to the page you want to see). </p>
<p>andykinsey.co.uk returns home for most errors and there are 3 or 4 forwards from old page names &amp; common typo&#8217;s </p>
<p>another then to use 301&#8217;s for is simply if you change your site structure to redirect traffic from external links to the new relevant page, without loosing any link juice!</p>
<p>301 &#8211; permanent redirect<br />
301 &#8211; temp redirect</p>
<p>nice post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-86</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Thu, 28 Jan 2010 12:51:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-86</guid>
		<description>@Kirsty,

Sorry, I understood that you were posting about Apache. I am on IIS, but the ISAPI plugin - IIS MOD-Rewrite - allows IIS to read and use htaccess files the same way Apache does... or at least to the best of it&#039;s ability - it&#039;s not 100% compatible. 

For the IIS version, this appears to be a point of non-compatibility.

I guess I&#039;m still just having trouble wrapping my head around the 500 error. If you set the HTTP Response headers in PHP to return a status code of 500, does this get kicked back up to your htaccess file? That is the workflow that is really fuzzy in my head.</description>
		<content:encoded><![CDATA[<p>@Kirsty,</p>
<p>Sorry, I understood that you were posting about Apache. I am on IIS, but the ISAPI plugin &#8211; IIS MOD-Rewrite &#8211; allows IIS to read and use htaccess files the same way Apache does&#8230; or at least to the best of it&#8217;s ability &#8211; it&#8217;s not 100% compatible. </p>
<p>For the IIS version, this appears to be a point of non-compatibility.</p>
<p>I guess I&#8217;m still just having trouble wrapping my head around the 500 error. If you set the HTTP Response headers in PHP to return a status code of 500, does this get kicked back up to your htaccess file? That is the workflow that is really fuzzy in my head.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kirstyburgoine</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-85</link>
		<dc:creator>kirstyburgoine</dc:creator>
		<pubDate>Thu, 28 Jan 2010 12:26:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-85</guid>
		<description>I have now updated my original post so that its clearer that the technique is for Apache :)</description>
		<content:encoded><![CDATA[<p>I have now updated my original post so that its clearer that the technique is for Apache <img src='http://www.web-ramblings.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kirstyburgoine</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-84</link>
		<dc:creator>kirstyburgoine</dc:creator>
		<pubDate>Thu, 28 Jan 2010 10:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-84</guid>
		<description>Hi Ben,
Thanks for all your comments on this its been really interesting.

Perhaps I should have been clearer in my original post, using .htaccess files is a technique specifically for Apache servers.

I know for a fact that Windows Servers using IIS will not read a .htaccess file, and although I have never used a Coldfusion server, you mention that its running IIS. In which case its highly likely that it won&#039;t use the .htaccess file either.

Many hosting companies have a setting within their control panel that allows you to set up custom error pages. I installed a website on a windows server the other day and to set up the error pages all I had to do was switch on that feature and tell it which page I wanted to display if an error occurred.

Perhaps its worth going back to your hosting and asking them what their preferred method is?

Thanks

Kirsty</description>
		<content:encoded><![CDATA[<p>Hi Ben,<br />
Thanks for all your comments on this its been really interesting.</p>
<p>Perhaps I should have been clearer in my original post, using .htaccess files is a technique specifically for Apache servers.</p>
<p>I know for a fact that Windows Servers using IIS will not read a .htaccess file, and although I have never used a Coldfusion server, you mention that its running IIS. In which case its highly likely that it won&#8217;t use the .htaccess file either.</p>
<p>Many hosting companies have a setting within their control panel that allows you to set up custom error pages. I installed a website on a windows server the other day and to set up the error pages all I had to do was switch on that feature and tell it which page I wanted to display if an error occurred.</p>
<p>Perhaps its worth going back to your hosting and asking them what their preferred method is?</p>
<p>Thanks</p>
<p>Kirsty</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-83</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Thu, 28 Jan 2010 00:50:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-83</guid>
		<description>@Kirsty,

It looks like this might be something that is not compatible with IIS MOD-Rewrite. I set up the following htaccess file:

ErrorDocument 400 400.cfm
ErrorDocument 401 400.cfm
ErrorDocument 403 400.cfm
ErrorDocument 404 400.cfm
ErrorDocument 500 500.cfm

I tried to trigger a 500 error from within the application server layer (ColdFusion) using CFHeader (which sets header values):

--------------------------------------


&quot;hello&quot;
--------------------------------------

This shows &quot;hello&quot; on the page, indicating that no redirect has been done. Furthermore, FireBug shows the response code coming back as 500. 

I thought that maybe this was an issue because I was setting a header and not actually throwing an error. So, I created another page with the bunk code (reference to an undefined variable):



This also shows up as a 500 status code in FireBug, but all I get is the error on the screen (Variable bar is undefined). 

I tried to look at the log file and I get this as the last few entires:

init rewrite engine with requested uri 
pass through /iis_mod_rewrite6/
init rewrite engine with requested uri 
pass through /iis_mod_rewrite6/index.cfm

It looks like the 500 error never gets passed back up into the rewrite engine. 

It looks like this approach is simply not compatible with IIS MOD-Rewrite :(</description>
		<content:encoded><![CDATA[<p>@Kirsty,</p>
<p>It looks like this might be something that is not compatible with IIS MOD-Rewrite. I set up the following htaccess file:</p>
<p>ErrorDocument 400 400.cfm<br />
ErrorDocument 401 400.cfm<br />
ErrorDocument 403 400.cfm<br />
ErrorDocument 404 400.cfm<br />
ErrorDocument 500 500.cfm</p>
<p>I tried to trigger a 500 error from within the application server layer (ColdFusion) using CFHeader (which sets header values):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&#8220;hello&#8221;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>This shows &#8220;hello&#8221; on the page, indicating that no redirect has been done. Furthermore, FireBug shows the response code coming back as 500. </p>
<p>I thought that maybe this was an issue because I was setting a header and not actually throwing an error. So, I created another page with the bunk code (reference to an undefined variable):</p>
<p>This also shows up as a 500 status code in FireBug, but all I get is the error on the screen (Variable bar is undefined). </p>
<p>I tried to look at the log file and I get this as the last few entires:</p>
<p>init rewrite engine with requested uri<br />
pass through /iis_mod_rewrite6/<br />
init rewrite engine with requested uri<br />
pass through /iis_mod_rewrite6/index.cfm</p>
<p>It looks like the 500 error never gets passed back up into the rewrite engine. </p>
<p>It looks like this approach is simply not compatible with IIS MOD-Rewrite <img src='http://www.web-ramblings.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-82</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Tue, 26 Jan 2010 00:42:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-82</guid>
		<description>Do you know if this will happen if the application server sets the response headers manually? Or does it only work with an uncaught exception is thrown?

Anyway, I&#039;ll do some research on my own. I appreciate the inspiration.</description>
		<content:encoded><![CDATA[<p>Do you know if this will happen if the application server sets the response headers manually? Or does it only work with an uncaught exception is thrown?</p>
<p>Anyway, I&#8217;ll do some research on my own. I appreciate the inspiration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kirstyburgoine</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-81</link>
		<dc:creator>kirstyburgoine</dc:creator>
		<pubDate>Mon, 25 Jan 2010 20:55:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-81</guid>
		<description>Hi Ben,

No worries, I&#039;ve seen far worse spellings of my name :)

I&#039;m not an absolute authority on this but my understanding is that a 500 error generally happens at step #4.

Once Apache hands the request off to the application server the page is loaded. Its during the page loading process that a javascript or an applet etc. can cause a 500 error.

If the server is set up to intepret these errors using the .htaccess file (which most Apache servers are, some need configuring though) the error is passed back to Apache which checks the .htaccess file to see how to handle it.

If you have set up default error pages then those are displayed. If not the default error page is displayed.

Here are a few resources I&#039;ve found helpful in the past:

http://httpd.apache.org/docs/2.0/custom-error.html
http://www.checkupdown.com/status/E500.html
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

I hope that is more helpful :)</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>No worries, I&#8217;ve seen far worse spellings of my name <img src='http://www.web-ramblings.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m not an absolute authority on this but my understanding is that a 500 error generally happens at step #4.</p>
<p>Once Apache hands the request off to the application server the page is loaded. Its during the page loading process that a javascript or an applet etc. can cause a 500 error.</p>
<p>If the server is set up to intepret these errors using the .htaccess file (which most Apache servers are, some need configuring though) the error is passed back to Apache which checks the .htaccess file to see how to handle it.</p>
<p>If you have set up default error pages then those are displayed. If not the default error page is displayed.</p>
<p>Here are a few resources I&#8217;ve found helpful in the past:</p>
<p><a href="http://httpd.apache.org/docs/2.0/custom-error.html" rel="nofollow">http://httpd.apache.org/docs/2.0/custom-error.html</a><br />
<a href="http://www.checkupdown.com/status/E500.html" rel="nofollow">http://www.checkupdown.com/status/E500.html</a><br />
<a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes" rel="nofollow">http://en.wikipedia.org/wiki/List_of_HTTP_status_codes</a></p>
<p>I hope that is more helpful <img src='http://www.web-ramblings.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-80</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Mon, 25 Jan 2010 17:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-80</guid>
		<description>Sorry if I am confusing. I have only built one site with mod-rewrite and all it was doing was forwarding to index.cfm/#path_info#. This is all relatively new to me and the IIS MOD-Rewrite documentation doesn&#039;t make any reference to the ErrorDocument directive (it&#039;s not 100% compatible with Apache&#039;s version).</description>
		<content:encoded><![CDATA[<p>Sorry if I am confusing. I have only built one site with mod-rewrite and all it was doing was forwarding to index.cfm/#path_info#. This is all relatively new to me and the IIS MOD-Rewrite documentation doesn&#8217;t make any reference to the ErrorDocument directive (it&#8217;s not 100% compatible with Apache&#8217;s version).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-79</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Mon, 25 Jan 2010 17:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-79</guid>
		<description>Ooops, sorry about misspelling your name (Kirsty).</description>
		<content:encoded><![CDATA[<p>Ooops, sorry about misspelling your name (Kirsty).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://www.web-ramblings.co.uk/the-importance-of-error-pages-%e2%80%a6/comment-page-1/#comment-78</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Mon, 25 Jan 2010 17:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-ramblings.co.uk/?p=180#comment-78</guid>
		<description>@Kristy,

Sorry, I don&#039;t think I was being clear in my question. The way I understand it, a request goes through a request work flow. For example (and forgive me if this is not accurate with Apache):

1. User requests page.
2. Apache receives request.
3. Apache applies URL rewriting based on htaccess.
4. Apache hands request off to application server (ie. PHP, ColdFusion, ASP). 

What I am asking is, the 500 errors in the htaccess file, do they handle 500 errors thrown in step #4 (once the request is handed off to the server-side scripting language)? Or do they only handle 500 errors thrown before step #3. 

And, if they only handle errors before step #3, how does Apache even get the URL rewriting step?

I guess I am confused as to how a 500 error would be at that particular time / place.</description>
		<content:encoded><![CDATA[<p>@Kristy,</p>
<p>Sorry, I don&#8217;t think I was being clear in my question. The way I understand it, a request goes through a request work flow. For example (and forgive me if this is not accurate with Apache):</p>
<p>1. User requests page.<br />
2. Apache receives request.<br />
3. Apache applies URL rewriting based on htaccess.<br />
4. Apache hands request off to application server (ie. PHP, ColdFusion, ASP). </p>
<p>What I am asking is, the 500 errors in the htaccess file, do they handle 500 errors thrown in step #4 (once the request is handed off to the server-side scripting language)? Or do they only handle 500 errors thrown before step #3. </p>
<p>And, if they only handle errors before step #3, how does Apache even get the URL rewriting step?</p>
<p>I guess I am confused as to how a 500 error would be at that particular time / place.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
