<?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>Open Source Web &#187; redirect</title>
	<atom:link href="http://www.open-source-web.com/tag/redirect/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.open-source-web.com</link>
	<description>Your open source for Development and Design</description>
	<lastBuildDate>Sun, 08 Jan 2012 10:21:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SEO Friendly Redirects with PHP</title>
		<link>http://www.open-source-web.com/php/seo-friendly-redirects-with-php/</link>
		<comments>http://www.open-source-web.com/php/seo-friendly-redirects-with-php/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 19:32:15 +0000</pubDate>
		<dc:creator>Adi</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.open-source-web.com/?p=60</guid>
		<description><![CDATA[With a basic redesign you probably wont have this problem but if you have rebuilt a website even with the same content if the URL&#8217;s have changed this will have a huge effect on your search engine presence as you will be starting from scratch. Your links from internal pages may not work, links from [...]]]></description>
			<content:encoded><![CDATA[<p>With a basic redesign you probably wont have this problem but if you have rebuilt a website even with the same content if the URL&#8217;s have changed this will have a huge effect on your search engine presence as you will be starting from scratch. Your links from internal pages may not work, links from external sites wont work and you will lose your pagerank (if it ever mattered anyway.)</p>
<p>A good way to keep your sites listing after a redevelopment is to use a redirect. If you are using an Apache server you can use the .htaccess file to redirect.</p>
<p><code>Redirect 301 /oldpage.html /newpage.html</code></p>
<p>But some times this isnt the best way if you have to redirect hundreds of pages. The alternative is to use a header redirect in PHP. Most web based languages such as ASP or RUBY will do the same thing but with different code.</p>
<p><code><span class="html"><br />
<span class="default">&lt;?php</span></span></code></p>
<p><code><span class="html"><span class="comment">// make this code the first line<br />
</span><span class="default">header</span><span class="keyword">(</span><span class="string">"Location: /newpage.php"</span><span class="keyword">,</span><span class="default">TRUE</span><span class="keyword">,</span><span class="default">301</span><span class="keyword">);</span><span class="keyword"> </span></span></code><code><span class="html"><span class="default"> </span><span class="comment">// 301 Moved Permanently</span></span></code> to newpage.php<br />
<code><span class="html"><span class="keyword"> </span><span class="default">?&gt;</span></span></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.open-source-web.com/php/seo-friendly-redirects-with-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SEO Apache Mod rewrite</title>
		<link>http://www.open-source-web.com/apache/seo-apache-mod-rewrite/</link>
		<comments>http://www.open-source-web.com/apache/seo-apache-mod-rewrite/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 21:03:07 +0000</pubDate>
		<dc:creator>Adi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.open-source-web.com/?p=18</guid>
		<description><![CDATA[I always tried to avoid using the .htaccess file as it either works really well or will take down the entire site. The code below will work on most sites using apache as long as they have modrewrite turned on and you edit the rules to suit your domain. You may ready be using a [...]]]></description>
			<content:encoded><![CDATA[<p>I always tried to avoid using the .htaccess file as it either works really well or will take down the entire site. The code below will work on most sites using apache as long as they have modrewrite turned on and you edit the rules to suit your domain.<br />
You may ready be using a .htaccess file on your server so double check as it may not show up on all FTP programs.</p>
<p>But why do you need to use one, well the short answer is you don&#8217;t but the long answer is it can help a lot to stop duplicate content being taken off search engines and in turn help improve your SEO.<br />
For example how often do you see urls like www.bbc.com/index.html ?</p>
<p>The code below will redirect any variation on your homepage to just one. it will add the www. to the domain name and remove the index.html or index.php which ever you might be using.</p>
<pre>RewriteEngine On
RewriteCond %{HTTP_HOST} ^somedomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.somedomain.com/$1 [R=301,L]

RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html(.*)\ HTTP/ [NC]
RewriteRule .* http://www.somedomain.com/ [R=301,L]</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.open-source-web.com/apache/seo-apache-mod-rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

