<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Spade</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Spade"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Spade"/>
	<updated>2026-09-03T23:36:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Creating_a_Custom_404_Error&amp;diff=62778</id>
		<title>Archived:Creating a Custom 404 Error</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Creating_a_Custom_404_Error&amp;diff=62778"/>
		<updated>2011-10-29T19:24:37Z</updated>

		<summary type="html">&lt;p&gt;Spade: needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to create a custom 404 Error Page for use in your Joomla 1.5 Web Site.&lt;br /&gt;
&lt;br /&gt;
This page summarizes popular techniques for adding Joomla! 404 Error Pages, as discussed by Amy Stephens and others in the Joomla! Forum Post [[jtopic:251089|Custom 404 Inside the Content Area]]&lt;br /&gt;
&lt;br /&gt;
== Four Steps to Creating a Custom 404 Error Page ==&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Create an Uncategorized &#039;404&#039; Article&#039;&#039;&#039;&lt;br /&gt;
#: Create an &#039;uncategorized&#039; article in Joomla! to serve as your 404 Page.  Include some text such as &#039;&#039;Sorry, we could not find the page you were looking for...&#039;&#039; and if necessary, also any useful navigational links.  For example, you may wish to add a link back to your site&#039;s home page.&lt;br /&gt;
# &#039;&#039;&#039;Create and copy a link to that new 404 Article.&#039;&#039;&#039;&lt;br /&gt;
#: Create a menu item which links to the new 404 Article and &#039;apply&#039; your changes.  Then copy the URL information (index.php?optio...), set the menu item as &#039;unpublished&#039; and close out of the menu editing page.  You may want to paste the copied URL into Notepad or somewhere accessible for the time-being.&lt;br /&gt;
# &#039;&#039;&#039;Copy error.php to your Template&#039;s Directory&#039;&#039;&#039;&lt;br /&gt;
#: In your Joomla! installation copy the file error.php from the templates/system directory, to your Template directory.  For example, if I was using a template named &#039;Cleancloud&#039; I would copy the error.php file to the templates/cleancloud directory.&lt;br /&gt;
# &#039;&#039;&#039;Modify error.php to Redirect 404 Errors to your 404 Article   &#039;&#039;&#039; &lt;br /&gt;
#: Edit the error.php file as follows, adding the code below immediately under the &#039;restricted access&#039; line:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if (($this-&amp;gt;error-&amp;gt;code) == &#039;404&#039;) {&lt;br /&gt;
header(&#039;Location: /index.php?option=com_content&amp;amp;view=article&amp;amp;id=75&#039;);&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you are using Joomla 1.6/1.7, use this detection code instead:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if (($this-&amp;gt;error-&amp;gt;getCode()) == &#039;404&#039;) {&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
::: Replace the location information (index.php?option..) with the URL from the menu item you created.&lt;br /&gt;
&lt;br /&gt;
== Additional Steps toward a Better Custom 404 Error Page ==&lt;br /&gt;
&lt;br /&gt;
* Add the following line to the robots.txt file located in the root directory of your Joomla! installation.&lt;br /&gt;
*: &amp;lt;code&amp;gt;Disallow: /index.php?option=com_content&amp;amp;view=article&amp;amp;id=75&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replacing the (index.php?option..) location with your 404 Article URL.&lt;br /&gt;
* Follow the Best-Practices described here:  http://www.alistapart.com/articles/perfect404/&lt;br /&gt;
* Be creative, add a [http://www.geekhaiku.com/tag/404/ 404 Haiku] or maybe an [http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded Interesting Photo]&lt;br /&gt;
&lt;br /&gt;
== More Custom Error Page Information ==&lt;br /&gt;
&lt;br /&gt;
* [[Custom_error_pages|Custom Error Pages]]&lt;br /&gt;
* [[System_error_pages|System Error Pages]]&lt;br /&gt;
* [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html HTTP/1.1 Status Code Definitions]&lt;br /&gt;
* [http://www.google.com/support/webmasters/bin/answer.py?answer=83040&amp;amp;topic=8474 Google Webmaster - Analyzing Crawl Errors]&lt;br /&gt;
&lt;br /&gt;
[[Category:Management]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Spade</name></author>
	</entry>
</feed>