<?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>avinash malla &#187; htaccess</title>
	<atom:link href="http://www.avim.com.np/tag/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.avim.com.np</link>
	<description>freelance web-developer and web-publisher [press F11]</description>
	<lastBuildDate>Sun, 01 Aug 2010 06:39:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to 404 Redirect in Joomla</title>
		<link>http://www.avim.com.np/404-redirect-in-joomla/</link>
		<comments>http://www.avim.com.np/404-redirect-in-joomla/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 07:18:01 +0000</pubDate>
		<dc:creator>Avinash Malla</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[joomla 404 redirect]]></category>
		<category><![CDATA[metarefresh]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.avim.com.np/?p=365</guid>
		<description><![CDATA[You must have come across such situations in your website, where google has crawled some pages of your website, but later you moved that page somewhere. You might fear that u&#8217;re loosing the leads to your website. You must have seen your website showing 404 (&#8221;Page Not Found&#8221;) messages.
Well there are some simple things you [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.avim.com.np%2F404-redirect-in-joomla%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.avim.com.np%2F404-redirect-in-joomla%2F" height="61" width="51" /></a></div><p>You must have come across such situations in your website, where google has crawled some pages of your website, but later you moved that page somewhere. You might fear that u&#8217;re loosing the leads to your website. You must have seen your website showing 404 (&#8221;Page Not Found&#8221;) messages.</p>
<p>Well there are some simple things you can do in your Joomla website. You can either create a custom error page(404 page) and then redirect the 404 messages to the custom page or simply redirect it to the homepage.</p>
<p>1. <strong>htaccess redirection</strong> : You can simply add this code to your .htaccess file</p>
<blockquote>
<div>ErrorDocument 404 index.php [to redirect it to your homepage]</div>
<div>ErrorDocument 404 /404.php [to redirect it to your custom error page named 404.php]</div>
</blockquote>
<div>2. <strong>Metarefresh</strong> : You can edit templates/system/error.php to add the following line after line 19 in the file (just before the close of the &lt;head&gt; tag)</div>
<div>
<blockquote>
<div>&lt;meta HTTP-EQUIV=&#8221;REFRESH&#8221; content=&#8221;5;  url=/&#8221;&gt; [the number 5 is the delay, u can change it]</div>
</blockquote>
<div>Using metarefresh technique, you will see the error page for a few while before it is redirected to the index page.</div>
<div></div>
</div>
<div>3. <strong>Header() function Redirection</strong> : I liked this the best. This technique uses the Header function. This is similar to the previous one but the interesting part is, if you use this technique, you won&#8217;t be seeing any error pages,not even for a few seconds.</div>
<div>All you have to do is add this code in the previous &#8220;error.php&#8221; file.</div>
<blockquote>
<div>defined( &#8216;_JEXEC&#8217; ) or die( &#8216;Restricted access&#8217; );<br />
header (&#8221;Location: /&#8221;); exit(); // add this line</div>
</blockquote>
<div></div>
<div>Piece of cake, isn&#8217;t it?? Have fun with 404&#8230;.!!</div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.avim.com.np/404-redirect-in-joomla/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
