<?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>Electronic Carpenter SEO Specialists &#187; Redirect</title>
	<atom:link href="http://www.ElectronicCarpenter.com/category/search-engine-optimization-code/redirect-url-301/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ElectronicCarpenter.com</link>
	<description>SEO, SEM, PPC Specialists to make your website grow.</description>
	<lastBuildDate>Sun, 04 Oct 2009 21:35:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Redirect, 301 Redirect</title>
		<link>http://www.ElectronicCarpenter.com/redirect-301-redirect/2008-09-27/electroniccarpenter</link>
		<comments>http://www.ElectronicCarpenter.com/redirect-301-redirect/2008-09-27/electroniccarpenter#comments</comments>
		<pubDate>Sat, 27 Sep 2008 15:37:33 +0000</pubDate>
		<dc:creator>PJ Vernon</dc:creator>
				<category><![CDATA[Domain]]></category>
		<category><![CDATA[Redirect]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[301 Redirect]]></category>
		<category><![CDATA[Apache Redirect]]></category>
		<category><![CDATA[ASP.net Redirect]]></category>
		<category><![CDATA[Cold Fusion Redirect]]></category>
		<category><![CDATA[Domain Redirect]]></category>
		<category><![CDATA[IIS Redirect]]></category>

		<guid isPermaLink="false">http://www.electroniccarpenter.com/?p=14</guid>
		<description><![CDATA[301 Redirect

301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It's not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it's the safest option. The code "301" is interpreted as "moved permanently".]]></description>
			<content:encoded><![CDATA[<h2>301 Redirect</h2>
<p class="defaultfont" align="justify">301 redirect is the most efficient and <strong>Search Engine Friendly</strong> method for webpage redirection. It&#8217;s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it&#8217;s the safest option. The code &quot;301&quot; is interpreted as &quot;moved permanently&quot;.</p>
<p class="defaultfont" align="justify">Below are a Couple of methods to implement <strong>URL Redirection</strong></p>
<h2>PHP Redirect</h2>
<p><span class="defaultfont">&lt;?<br />
Header( &quot;HTTP/1.1 301 Moved Permanently&quot; );<br />
Header( &quot;Location: http://www.new-url.com&quot; );<br />
?&gt;</span></p>
<h2>IIS Redirect</h2>
<ul class="defaultfont">
<li>In internet services manager, right click on the file or folder you wish to redirect</li>
<li>Select the radio titled &quot;a redirection to a URL&quot;.</li>
<li>Enter the redirection page</li>
<li>Check &quot;The exact url entered above&quot; and the &quot;A permanent redirection for this resource&quot;</li>
<li>Click on &#8216;Apply&#8217;</li>
</ul>
<h2>ColdFusion Redirect</h2>
<p><span class="defaultfont"> &lt;.cfheader statuscode=&quot;301&quot; statustext=&quot;Moved permanently&quot;&gt;<br />
&lt;.cfheader name=&quot;Location&quot; value=&quot;http://www.new-url.com&quot;&gt; </span></p>
<h2>ASP Redirect</h2>
<p><span class="defaultfont"> &lt;%@ Language=VBScript %&gt;<br />
&lt;%<br />
Response.Status=&quot;301 Moved Permanently&quot;<br />
Response.AddHeader &quot;Location&quot;,&quot;http://www.new-url.com/&quot;<br />
%&gt; </span></p>
<h2>ASP .NET Redirect</h2>
<p><span class="defaultfont"> &lt;script runat=&quot;server&quot;&gt;<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
Response.Status = &quot;301 Moved Permanently&quot;;<br />
Response.AddHeader(&quot;Location&quot;,&quot;http://www.new-url.com&quot;);<br />
}<br />
&lt;/script&gt; </span></p>
<h2>JSP (Java) Redirect</h2>
<p><span class="defaultfont"> &lt;%<br />
response.setStatus(301);<br />
response.setHeader( &quot;Location&quot;, &quot;http://www.new-url.com/&quot; );<br />
response.setHeader( &quot;Connection&quot;, &quot;close&quot; );<br />
%&gt; </span></p>
<h2>CGI PERL Redirect</h2>
<p><span class="defaultfont"> $q = new CGI;<br />
print $q-&gt;redirect(&quot;http://www.new-url.com/&quot;); </span></p>
<h2>Ruby on Rails Redirect</h2>
<p><span class="defaultfont"> def old_action<br />
headers[&quot;Status&quot;] = &quot;301 Moved Permanently&quot;<br />
redirect_to &quot;http://www.new-url.com/&quot;<br />
end </span></p>
<h2>Redirect Old domain to New domain (htaccess redirect)</h2>
<p class="defaultfont" align="justify">Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.<br />
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)</p>
<p class="defaultfont" align="justify">Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]</p>
<p class="defaultfont" align="justify">Please REPLACE www.newdomain.com in the above code with your actual domain name.</p>
<p class="defaultfont" align="justify">In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.</p>
<p class="defaultfont" align="justify"><strong>Note*</strong> This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.</p>
<h2>Redirect to www (htaccess redirect)</h2>
<p class="defaultfont" align="justify">Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com<br />
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)</p>
<p class="defaultfont" align="justify">Options +FollowSymlinks<br />
RewriteEngine on<br />
rewritecond %{http_host} ^domain.com [nc]<br />
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]</p>
<p class="defaultfont" align="justify">Please REPLACE domain.com and www.newdomain.com with your actual domain name.</p>
<p class="defaultfont" align="justify"><strong>Note*</strong> This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.</p>
<h2>How to Redirect HTML</h2>
<p class="defaultfont" align="justify">Please refer to section titled &#8216;How to Redirect with htaccess&#8217;, if your site is hosted on a Linux Server and &#8216;IIS Redirect&#8217;, if your site is hosted on a Windows Server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ElectronicCarpenter.com/redirect-301-redirect/2008-09-27/electroniccarpenter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
