<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>DivitoDesign &#187; htaccess</title> <atom:link href="http://divitodesign.com/tag/htaccess/feed/" rel="self" type="application/rss+xml" /><link>http://divitodesign.com</link> <description>Articles, Tutorials and Resources for the Webdesigner</description> <lastBuildDate>Fri, 07 Oct 2011 18:47:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>404 Error Page: Features and Implantation</title><link>http://divitodesign.com/accesibility/404-error-page-features-and-implantation/</link> <comments>http://divitodesign.com/accesibility/404-error-page-features-and-implantation/#comments</comments> <pubDate>Sun, 23 Nov 2008 16:05:10 +0000</pubDate> <dc:creator>Stefan Vervoort</dc:creator> <category><![CDATA[Web Accesibility]]></category> <category><![CDATA[htaccess]]></category> <category><![CDATA[Wordpress]]></category><guid isPermaLink="false">http://www.divitodesign.com/?p=1227</guid> <description><![CDATA[404 error pages are pages where people arrive after they have visited a  link that doesn&#8217;t exist. Various reasons could have caused this: the pages could have been moved or deleted or it was just by accident. These people were interested in your site, but without a proper 404 error page, they might just move [...]]]></description> <content:encoded><![CDATA[<p>404 error pages are pages where people arrive after they have visited a  link that doesn&#8217;t exist. Various reasons could have caused this: the pages could have been moved or deleted or it was just by accident. These people were interested in your site, but without a proper 404 error page, they might just move on.</p><p>Today we will talk about what features an error page should have and how we can implant the custom error page into our site or blog.</p><h2>The Features of a Good 404 Error Page</h2><p>The points that I will refer to have been working for me for a couple years.</p><ol><li><strong>Descriptive title</strong> &#8211; The user should know they are on a 404 page, so don&#8217;t forget to tell them they are.</li><li><strong>Sitemap</strong> &#8211; If you have a sitemap, be sure to include a link to your sitemap on your error page. People might browse through the sitemap to find the page they were looking for.<img class="alignright size-full wp-image-1230" title="stop" src="http://www.divitodesign.com/wp-content/uploads/2008/11/stop.jpg" alt="stop" width="157" height="182" /></li><li><strong>Mistyped URL</strong> &#8211; On an error page you could include the mistyped URL. This makes it easy for the visitor to scan the URL for typos or mistakes.</li><li><strong>Search box</strong> &#8211; A search box in the 404 page is a must. The possiblity exists that the information is still on the site and with a simple search, the user might find the information they need.</li><li><strong>Common links</strong> &#8211; Adding a couple links to some common pages (like the about/contact/articles pages) will increase the number of people that stay and want to read something on your site.</li><li><strong>Popular articles</strong> &#8211; Displaying a number of popular articles is good to push your best content forward. Visitors might get interested by these titles and click an article.</li><li><strong>Archives</strong> &#8211; It is also possible to add the list of archives to your error page. They might find the article they are looking for. If not, they might browse the archives to look for this article and then might stumble on some other interesting article.</li></ol><p><span id="more-1227"></span></p><h2 class="tag">Implant the 404 Error Page in Your Site</h2><p>Now you know what features your error page has, it is time to implant it on your site or blog. I will discuss two ways to get your error page up and running. One way is an error page in <strong>WordPress</strong> and the other is via <strong>.htaccess</strong>.</p><h2>404 Error Page in WordPress</h2><p>WordPress has a build-in error message in their themes. This isn&#8217;t the best solution as it only give the user this explanation: <em>Error 404 &#8211; Not Found </em>.</p><h3>Editing the error text</h3><p>One thing you can do is editing that text in your WordPress theme. You should locate index.php and find the error message. You can add more and better text to your likings.</p><h3>Creating an error page</h3><p>You could also create a custom error page. This solution is in my opinion the best for WordPress. You should make a file called 404.php, add the custom text and messages, add it in your theme directory and your error page is ready to go.</p><h2>404 Error Page via htaccess</h2><p>If you don&#8217;t use a blogging tool like WordPress you need a proper looking 404 error page too.</p><p>The first step we will take is opening (or creating if you don&#8217;t already have one) the <strong>.htaccess</strong> file. We need to add a couple extra lines to this file to tell our server to redirect the visitor to a custom 404 page once they have need it.</p><p>You should add these codes to the .htaccess file:</p><div class="fvch-code"><pre class="fvch-line-numbers">1
</pre><pre><span class="html">ErrorDocument 404 /404.html</span></pre></div><p>This tells the server your 404 document is located somewhere other than default. <strong>You now have the power to change the error page to your likings.</strong></p><h2>Other Error Pages</h2><p>You could also use this trick to build custom error messages for other apache errors. <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html">Take a look here for the status codes Apache uses</a>.</p> ]]></content:encoded> <wfw:commentRss>http://divitodesign.com/accesibility/404-error-page-features-and-implantation/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 12/21 queries in 0.017 seconds using disk: basic
Object Caching 259/283 objects using disk: basic

Served from: divitodesign.com @ 2012-05-22 10:41:24 -->
