<?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>Linux Windows System Administrator Help &#187; 301 Moved Permanently</title>
	<atom:link href="http://linuxwindowsmaster.com/tag/301-moved-permanently/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxwindowsmaster.com</link>
	<description></description>
	<lastBuildDate>Thu, 20 May 2010 20:07:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>301 Redirect</title>
		<link>http://linuxwindowsmaster.com/301-redirect/</link>
		<comments>http://linuxwindowsmaster.com/301-redirect/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 21:10:55 +0000</pubDate>
		<dc:creator>AlexP</dc:creator>
				<category><![CDATA[ASP.NET, IIS, MS SQL]]></category>
		<category><![CDATA[301 Moved Permanently]]></category>
		<category><![CDATA[301 redirect]]></category>

		<guid isPermaLink="false">http://linuxwindowsmaster.com/?p=154</guid>
		<description><![CDATA[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”.
IIS [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong>301 redirect</strong> is the most efficient and <strong>Search Engine Friendly</strong> 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”.</p>
<h2>IIS Redirect</h2>
<ul type="disc">
<li class="MsoNormal">In internet services manager,      right click on the file or folder you wish to redirect</li>
<li class="MsoNormal">Select the radio titled      “a redirection to a URL”.</li>
<li class="MsoNormal">Enter the redirection page</li>
<li class="MsoNormal">Check “The exact url      entered above” and the “A permanent redirection for this      resource”</li>
<li class="MsoNormal">Click on ‘Apply’</li>
</ul>
<h2>ColdFusion Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;.cfheader statuscode=”301? statustext=”Moved permanently”&gt;<br />
&lt;.cfheader name=”Location” value=”http://www.new-url.com”&gt;</p>
<h2>PHP Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;?<br />
Header( “HTTP/1.1 301 Moved Permanently” );<br />
Header( “Location: http://www.new-url.com” );<br />
?&gt;</p>
<h2>ASP Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;%@ Language=VBScript %&gt;<br />
&lt;%<br />
Response.Status=”301 Moved Permanently”;<br />
Response.AddHeader(”Location”,”http://www.new-url.com/”);<br />
%&gt;</p>
<h2>ASP .NET Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;script runat=”server”&gt;<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
Response.Status = “301 Moved Permanently”;<br />
Response.AddHeader(”Location”,”http://www.new-url.com”);<br />
}<br />
&lt;/script&gt;</p>
<h2>JSP (Java) Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;%<br />
response.setStatus(301);<br />
response.setHeader( “Location”, “http://www.new-url.com/” );<br />
response.setHeader( “Connection”, “close” );<br />
%&gt;</p>
<h2>CGI PERL Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">$q = new CGI;<br />
print $q-&gt;redirect(”http://www.new-url.com/”);</p>
<h2>Ruby on Rails Redirect</h2>
<p class="MsoNormal">def old_action<br />
headers["Status"] = “301 Moved Permanently”<br />
redirect_to “http://www.new-url.com/”<br />
end</p>
<p class="MsoNormal">
<h2>Redirect Old domain to New domain</h2>
<p class="defaultfont">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">Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]</p>
<p class="defaultfont">Please REPLACE www.newdomain.com in the above code with your actual domain name.</p>
<p class="defaultfont">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="MsoNormal">
<h2>Redirect to www</h2>
<p class="defaultfont">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">Options +FollowSymlinks<br />
RewriteEngine on<br />
rewritecond %{http_host} ^domain.com [nc]<br />
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]</p>
<p>Please REPLACE domain.com and www.newdomain.com with your actual domain name.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxwindowsmaster.com/301-redirect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
