<?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; SEO</title>
	<atom:link href="http://www.open-source-web.com/tag/seo/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>Fix Canonical URL with link rel=&#8221;canonical&#8221; in PHP</title>
		<link>http://www.open-source-web.com/seo/fix-canonical-url-with-link-relcanonical-in-php/</link>
		<comments>http://www.open-source-web.com/seo/fix-canonical-url-with-link-relcanonical-in-php/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 20:32:54 +0000</pubDate>
		<dc:creator>Adi</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Canonical]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tag]]></category>

		<guid isPermaLink="false">http://www.open-source-web.com/?p=83</guid>
		<description><![CDATA[Recently the major search engines have worked together to help fix one of the biggest problems in SEO, The canonical URL. With this quick fix all you need to do is add a tag to the &#60;head&#62; section of the page and search engines will use this as an anchor to index the page. since [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the major search engines have worked together to help fix one of the biggest problems in SEO, The canonical URL. With this quick fix all you need to do is add a tag to the &lt;head&gt; section of the page and search engines will use this as an anchor to index the page.</p>
<p>since it is still fairly new we don&#8217;t know how it will work in the long run and if there are any side effects such as the pagerank not transferring.</p>
<p>The new tag looks like this</p>
<p align="center"><strong><code>&lt;link rel="canonical" href="http://www.open-source-web.com/"&gt;</code></strong></p>
<p>But nothing can be that easy, obviously with a large site you wouldn&#8217;t want to write that out for a million pages so here is the PHP code to make it work.</p>
<pre name="code" class="php">

$thispage = "http://www.";
$thispage .= $_SERVER["SERVER_NAME"];
$thispage .= $_SERVER["PHP_SELF"];
if($_SERVER["QUERY_STRING"]){$thispage .= "?".$_SERVER["QUERY_STRING"];}

&lt;link rel="canonical" href="&lt;? echo $thispage;?&gt;"&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.open-source-web.com/seo/fix-canonical-url-with-link-relcanonical-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

