<?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>The Webmaster's Café &#187; SEO</title>
	<atom:link href="http://www.thewebmasterscafe.net/category/seo/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thewebmasterscafe.net</link>
	<description>Resources For Webmasters, Web Developers and Web Designers</description>
	<lastBuildDate>Wed, 20 Aug 2008 00:02: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>How To Dynamically Add Pages To Your WordPress Sitemap</title>
		<link>http://www.thewebmasterscafe.net/seo/add-dynamic-entries-to-wordpress-sitemap.html</link>
		<comments>http://www.thewebmasterscafe.net/seo/add-dynamic-entries-to-wordpress-sitemap.html#comments</comments>
		<pubDate>Sun, 17 Feb 2008 01:41:30 +0000</pubDate>
		<dc:creator>Stephane</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.thewebmasterscafe.net/seo/add-dynamic-entries-to-wordpress-sitemap.html</guid>
		<description><![CDATA[If you are using the sitemap plugin for WordPress from Arne Brachhold, you may have the need to add additional pages which are not generated by your blog. If you&#8217;ve got a handful of pages, the sitemap plugin gives your the possibility to add them manually through the option page. There is also an option [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using the sitemap plugin for WordPress from <a href="http://www.arnebrachhold.de/" title="Visit author homepage">Arne Brachhold</a>, you may have the need to add additional pages which are not generated by your blog. If you&#8217;ve got a handful of pages, the sitemap plugin gives your the possibility to add them manually through the option page. There is also an option that allows the plugin to build the sitemap based on requests sent to your web server.</p>
<p>This may be useful but if you need a little more control, here&#8217;s how to dynamically add pages to your WordPress sitemap:</p>
<p>1. Edit /wp-content/plugins/google-sitemap-generator/sitemap.php</p>
<p>2. Find the line that reads:</p>
<blockquote><p><span style="font-family: courier new,courier"><span style="font-family: courier new,courier">$this-&gt;AddElement(new GoogleSitemapGeneratorXmlEntry(&#8220;&lt;/urlset&gt;&#8221;));</span></span></p></blockquote>
<p>3. Just before this line, insert:</p>
<blockquote><p><span style="font-family: courier new,courier"><span style="font-family: courier new,courier">include(&#8220;mysitemap.php&#8221;);</span></span></p></blockquote>
<p>4. Create a new empty file into <strong>/wp-content/plugins/google-sitemap-generator/</strong> and save it as <strong>mysitemap.php</strong>.</p>
<p>5. Insert the following content into your newly created file:</p>
<p class="divSourceCode"><span style="font-family: courier new,courier">&lt;?php</span></p>
<p class="divSourceCode"><span style="font-family: courier new,courier">$this-&gt;AddElement(new GoogleSitemapGeneratorXmlEntry(&#8221; &lt;url&gt;&#8221;));</span></p>
<p><span style="color: #ff0000; font-family: courier new,courier">$this-&gt;AddElement(new GoogleSitemapGeneratorXmlEntry(&#8220;\n &lt;loc&gt;http://www.yourdomain.com/document.html&lt;/loc&gt;&#8221;));</span></p>
<p><span style="color: #ff0000; font-family: courier new,courier">$this-&gt;AddElement(new GoogleSitemapGeneratorXmlEntry(&#8220;\n &lt;changefreq&gt;weekly&lt;/changefreq&gt;&#8221;));</span></p>
<p><span style="color: #ff0000; font-family: courier new,courier">$this-&gt;AddElement(new GoogleSitemapGeneratorXmlEntry(&#8220;\n &lt;priority&gt;0.5&lt;/priority&gt;&#8221;));</span></p>
<p><span style="font-family: courier new,courier">$this-&gt;AddElement(new GoogleSitemapGeneratorXmlEntry(&#8220;\n &lt;/url&gt;\n&#8221;));</span></p>
<p><span style="font-family: courier new,courier">?&gt;</span></p>
<p>6. Once your done, upload sitemap.php and mysitemap.php to your web server.</p>
<p>Of course the iteration process has to occur between the &lt;url&gt; and &lt;/url&gt; entries (<em>the part identified in red</em>). You can dynamically add pages using an SQL query for example.</p>
<p>The <em>sitemap.xml</em> and <em>sitemap.xml.gz</em> files will automatically be updated with your dynamic entries next time your rebuild your sitemap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterscafe.net/seo/add-dynamic-entries-to-wordpress-sitemap.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Which Keywords Lead Visitors To Your Competitors?</title>
		<link>http://www.thewebmasterscafe.net/seo/competitors-keywords.html</link>
		<comments>http://www.thewebmasterscafe.net/seo/competitors-keywords.html#comments</comments>
		<pubDate>Fri, 11 Jan 2008 18:50:48 +0000</pubDate>
		<dc:creator>Stephane</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[keyword research]]></category>

		<guid isPermaLink="false">http://www.thewebmasterscafe.net/seo/competitors-keywords.html</guid>
		<description><![CDATA[Finding the right keywords to focus on when you&#8217;re writing content for your website is sometime hard. I used to put up some content, wait for sometime, check my stats and over time I&#8217;d be able to figure out which keywords my visitors were using to find me. One way to speed up thing is [...]]]></description>
			<content:encoded><![CDATA[<p>Finding the right keywords to focus on when you&#8217;re writing content for your website is sometime hard. I used to put up some content, wait for sometime, check my stats and over time I&#8217;d be able to figure out which keywords my visitors were using to find me.</p>
<p>One way to speed up thing is by finding out the keywords that lead visitors to your competitors&#8217; website (assuming you know your competition of course). To find out what keywords is sending them traffic, I use <a href="http://www.seodigger.com" target="_blank">SeoDigger.com</a>. It&#8217;s a free online tool that detects which keywords leads to a particular URL.</p>
<p>SeoDigger.com is pretty easy to use: simply enter the URL of the website you want to do keyword research on.</p>
<p style="text-align: center"><img src="http://www.thewebmasterscafe.net/wp-content/uploads/2008/01/seodigger.jpg" alt="SeoDigger.com" /></p>
<p>Once you&#8217;ve got the results, you can find out which keywords are searched for often. Just sort the results by WT (Wordtracker) or OT (Overture Tool). Keep in mind that Wordtracker&#8217;s keyword popularity estimation is based on a daily basis whereas Overture base its results on a monthly basis.</p>
<p>Looking at the screenshot above, you can see that GoogleLady.com gets a lot of traffic for the search term &#8220;adwords tip&#8221;. According to Wordtracker, &#8220;adwords tip&#8221; is searched 248 times a day and GoogleLady.com is in 8th position for this keyword.</p>
<p>Registering on SeoDigger.com gives you the possibility to perform a full search so if you aren&#8217;t getting any results for a particular, try logging in and check the &#8220;Full search for domain name&#8221; checkbox before attempting to do another search.</p>
<p>What other keyword tool do you like?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterscafe.net/seo/competitors-keywords.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CSS And Images to Optimize Your Website For Search Engines</title>
		<link>http://www.thewebmasterscafe.net/seo/css-seo.html</link>
		<comments>http://www.thewebmasterscafe.net/seo/css-seo.html#comments</comments>
		<pubDate>Thu, 06 Dec 2007 16:42:02 +0000</pubDate>
		<dc:creator>Stephane</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[search engine optimization]]></category>

		<guid isPermaLink="false">http://www.thewebmasterscafe.net/seo/css-seo.html</guid>
		<description><![CDATA[When I build a website and write content, I try to find the right balance between SEO and the visitors experience. A sure way to optimize your website for search engine without altering your visitors&#8217; experience is to use CSS. One important thing to consider when it comes to SEO is your webpage&#8217;s first sentences. [...]]]></description>
			<content:encoded><![CDATA[<p>When I build a website and write content, I try to find the right balance between SEO and the visitors experience. A sure way to optimize your website for search engine without altering your visitors&#8217; experience is to use CSS.</p>
<p>One important thing to consider when it comes to SEO is your webpage&#8217;s first sentences. Your most important keywords should be at the beginning of your webpage. Unfortunately for most websites, the first thing that&#8217;s appearing on their website is&#8230; the header and the top menu! And usually this menu consists of keywords like: home, contact, about us, privacy, etc.</p>
<h2>How Search Engines Are Seeing Your Website</h2>
<p>Even though you&#8217;ve got this great ergonomic layout that makes your site intuitive, keep in mind that your website isn&#8217;t seen the same way by search engines. To get an idea of how my website is seen by search engine, I use <a href="http://dlperry.com/what_search_engine_spiders_see.html" target="_blank">this tool from dlperry.com</a>.</p>
<p>This shows your website content as it&#8217;s seen by search engines.</p>
<h2>Transforming Unimportant Keywords Into Images</h2>
<p>Suppose you&#8217;ve got your website name written in plain text at the top of your website and that it doesn&#8217;t contain important keywords, you could simply replace it with an image file.</p>
<p>This trick has to be used with precaution. Don&#8217;t abuse of this technique. I use this to remove unimportant keywords from the top of my webpages, not everywhere, just at the top. Using too many images could slow down your website.</p>
<h2>Using CSS To Move Unimportant Keywords At The End Of The HTML Code</h2>
<p>Now this is where it gets interesting. For example, we&#8217;ll use the following webpage layout (click to enlarge):</p>
<p><a href="http://www.thewebmasterscafe.net/wp-content/uploads/2007/12/mywebsite.jpg" target="_blank" title="mywebsite.jpg"><img src="http://www.thewebmasterscafe.net/wp-content/uploads/2007/12/mywebsite.thumbnail.jpg" alt="mywebsite.jpg" border="0" height="88" width="128" /></a></p>
<p>If I had used a table to build this webpage, the source code would look something like this (I&#8217;ve shorten the &#8220;lorem ipsum&#8221; content):</p>
<blockquote>
<p class="SourceCode"><span style="color: #008000">&lt;table border=&#8221;0&#8243; width=&#8221;760&#8243;&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;img src=&#8221;images/logo.jpg&#8221;&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;home | about | contact | privacy&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;h1&gt;My Document Title&lt;/h1&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed in dolor ut sapien suscipit faucibus. Maecenas a sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer auctor interdum lorem&#8230;&lt;/p&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;Copyright MyWebsite&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;</span></p></blockquote>
<p>And this is how this webpage would be seen by search engines (again, the lorem ipsum part have been shorten):</p>
<blockquote>
<p class="SourceCode"><span style="color: #008000">home | about | contact | privacy My Document Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed in dolor ut sapien suscipit faucibus. Maecenas a sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer auctor interdum lorem. Copyright MyWebsite</span></p>
</blockquote>
<p>Now <strong>what you want to do is to move the top menu&#8217;s content at the end of the HTML code</strong>. Visually, you still want it to be at the top of the webpage though. We&#8217;re going to use layers (DIV) and CSS to do that.</p>
<p>T<strong>he first step is to transform the table into layers.</strong> We&#8217;ll be able to position layers wherever we want them later using CSS. This is the source code used to generate the same layout but with layers instead of a table:</p>
<blockquote>
<p class="SourceCode"><span style="color: #008000">&lt;div id=&#8221;divHeader&#8221;&gt;<br />
&lt;img src=&#8221;images/logo.jpg&#8221; width=&#8221;400&#8243; height=&#8221;90&#8243; /&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;divBody&#8221;&gt;<br />
&lt;div id=&#8221;divContent&#8221;&gt;<br />
&lt;h1&gt;My Document Title &lt;/h1&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed in dolor ut   sapien suscipit faucibus. Maecenas a sem. Class aptent taciti sociosqu ad litora   torquent per conubia nostra, per inceptos hymenaeos.&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;divFooter&#8221;&gt;Copyright MyWebsite&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;divTopMenu&#8221;&gt;home | about | contact | privacy&lt;/div&gt;</span></p></blockquote>
<p><strong>And this is the CSS styles applied to the webpage:</strong></p>
<blockquote class="SourceCode"><p><span style="color: #008000">#divHeader { position: absolute; width: 100%; height: 90px; width: 760px;}</span></p>
<p><span style="color: #008000">#divBody { position: absolute; margin-top: 112px; width: 760px; }</span></p>
<p><span style="color: #008000">#divContent { position: relative; padding: 15px; }</span></p>
<p><span style="color: #008000">#divTopMenu { position: absolute; margin-top: 90px; padding-left: 15px; width: 745px; }</span></p>
<p><span style="color: #008000">#divFooter { position: relative; text-align: center; }</span></p></blockquote>
<p><strong>So now here&#8217;s how my website is seen by search engines:</strong></p>
<blockquote>
<p class="SourceCode"><span style="color: #008000">My Document Title Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed in dolor ut sapien suscipit faucibus. Maecenas a sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer auctor interdum lorem. home | about | contact | privacy  Copyright MyWebsite</span></p>
</blockquote>
<p>Now all that&#8217;s left to do is to optimize the first keywords found at the beginning of your webpages!</p>
<p>If you&#8217;d like to see the full source-code for this tutorial, you can download it here: <a href="http://www.thewebmasterscafe.net/wp-content/uploads/2007/12/css_and_images_seo.zip" title="css_and_images_seo.zip">css_and_images_seo.zip</a></p>
<p>Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterscafe.net/seo/css-seo.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Know Your Visitors: Installing AwStats</title>
		<link>http://www.thewebmasterscafe.net/webhosting/awstats-tutorial.html</link>
		<comments>http://www.thewebmasterscafe.net/webhosting/awstats-tutorial.html#comments</comments>
		<pubDate>Tue, 18 Sep 2007 11:40:24 +0000</pubDate>
		<dc:creator>Stephane</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Hosting]]></category>

		<guid isPermaLink="false">http://www.thewebmasterscafe.net/webhosting/awstats-tutorial.html</guid>
		<description><![CDATA[Knowing your visitors is crucial to your website, especially if you’re generating an income from the traffic you get, whether it’s through sales or advertisement. That’s why it’s important to have good statistics about your site. You want to know where your visitors came from, how they found your site, which pages they’ve read, how [...]]]></description>
			<content:encoded><![CDATA[<p>Knowing your visitors is crucial to your website, especially if you’re generating an income from the traffic you get, whether it’s through sales or advertisement. That’s why it’s important to have good statistics about your site. You want to know where your visitors came from, how they found your site, which pages they’ve read, how long they stayed, how often they come back, etc.</p>
<p>While there are plenty of tools available, I’ll focus mainly on <a href="http://www.awstats.org" target="_blank">AwStats</a> today. AwStats is a free and powerful tool that generates advanced statistics for many protocols including web, streaming, ftp and mail transfer. This log analyzer works as a CGI or from command line and generates statistics in HTML format.</p>
<h3>Installing AwStats On Linux</h3>
<ol>
<li>Get your copy of AwStats from SourceForge.net at<br />
<a href="http://sourceforge.net/project/showfiles.php?group_id=13764" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=13764</a></li>
<li>Extract all files from the archive and upload it to a temporary folder on your web server. This folder needs not to be accessible through HTTP.# tar xvzf awstats-[version].tar.gz</li>
<li>Move all the content from the archive to <strong>/usr/local/awstats</strong>. When you’re done, this directory should contain:
<ul>
<li>./docs</li>
<li>./README.TXT</li>
<li>./tools</li>
<li>./wwwroot</li>
</ul>
</li>
<li>Change directory to <strong>/usr/local/awstats/tools</strong> and execute <strong>./awstats_configure.pl<em># cd /usr/local/awstats/tools<em><br />
# ./awstats_configure.pl<br />
</em></em></strong></li>
<li>Go through the configuration script.</li>
<li>Add a cron task to update statistics on a daily basis. To do this, simply create a new file named <strong>awstats_updateall.sh</strong> into <strong>/etc/cron.daily</strong>. This is the script’s content:<em>#!/bin/sh<br />
/usr/local/awstats/tools/awstats_updateall.pl now<br />
</em></li>
<li>Add execute permission to <strong>awstats_updateall.sh<br />
</strong><em><br />
# chmod 0755 /etc/cron.daily/awstats_updateall.sh<br />
</em></li>
<li>Create a directory named “awstats” into /var/lib.</li>
<li>Verify that the following directives have been added to your httpd.conf file. If not, you will have to add them manually:<em>#<br />
Alias /awstatsclasses &#8220;/usr/local/awstats/wwwroot/classes/&#8221;<br />
Alias /awstatscss &#8220;/usr/local/awstats/wwwroot/css/&#8221;<br />
Alias /awstatsicons &#8220;/usr/local/awstats/wwwroot/icon/&#8221;<br />
ScriptAlias /awstats/ &#8220;/usr/local/awstats/wwwroot/cgi-bin/&#8221;<br />
#<br />
# This is to permit URL access to scripts/files in AWStats directory.<br />
#<br />
<em><span style="font-size: 10.5pt; font-family: Arial" lang="EN-US">&lt;Directory &#8220;/usr/local/awstats/wwwroot&#8221;&gt;</span><br />
Options None<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</em><em><span style="font-size: 10.5pt; font-family: Arial" lang="EN-US">&lt;/Directory&gt;<br />
</span></em></em></li>
<li>Edit your AwStats configuration to make sure all settings are correct. This file is located in <strong>/etc/awstats/awstats.[your domain name].conf</strong></li>
<li>Make sure your httpd access log file format is “combined”. To verify this, open /etc/httpd/conf/httpd.conf and look for:<br />
<em><br />
CustomLog [your log path]/access_log common</em>andchange it to:<br />
<em><br />
CustomLog [your log path]/access_log combined<br />
</em></li>
<li>Restart the httpd service:<br />
<em><br />
# service httpd restart<br />
</em></li>
<li>Generate some statistics:<br />
<em><br />
# /etc/cron.daily/awstats_updateall.sh<br />
</em></li>
<li>Try accessing AwStats through your web browser at http://[your domain name]/awstats/awstats.pl</li>
</ol>
<p>That’s pretty much it!</p>
<p>You can read the AwStats documentation here : <a href="http://awstats.sourceforge.net/docs/index.html" target="_blank">http://awstats.sourceforge.net/docs/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterscafe.net/webhosting/awstats-tutorial.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search Engine Friendly URLs</title>
		<link>http://www.thewebmasterscafe.net/seo/search-engine-friendly-urls.html</link>
		<comments>http://www.thewebmasterscafe.net/seo/search-engine-friendly-urls.html#comments</comments>
		<pubDate>Sat, 08 Sep 2007 15:18:03 +0000</pubDate>
		<dc:creator>Stephane</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.thewebmasterscafe.net/seo/search-engine-friendly-urls.html</guid>
		<description><![CDATA[Is your database-driven website indexed by every search engines? Are your URLs impossible to remember for your visitors because they look like this: http://www.mydomain.com/ articles.php?category=39&#38;article=27 This is a problem with large websites as they are database-driven and parameters have to be sent to a script for processing. Search engines are much better at indexing static [...]]]></description>
			<content:encoded><![CDATA[<p>Is your database-driven website indexed by every search engines? Are your URLs impossible to remember for your visitors because they look like this:</p>
<p><em>http://www.mydomain.com/<br />
articles.php?category=39&amp;article=27</em></p>
<p>This is a problem with large websites as they are database-driven and parameters have to be sent to a script for processing. Search engines are much better at indexing static pages. Even though Google doesn&#8217;t seem to be afraid of dynamic pages, other search engines such as Yahoo! and Live will probably index just a few pages as they don&#8217;t want to be caught in a loop.</p>
<p>Fortunately, there are at least three solutions to this: using PATH INFO, ForceType and mod_rewrite.</p>
<p><em>There&#8217;s another method which involves 404 pages but I wouldn&#8217;t recommend it since you won&#8217;t be able to submit your sitemap to Google. When you add your website to <a target="_blank" href="http://www.google.com/webmasters/">Google&#8217;s Webmaster Tools</a>, 404 pages MUST return a 404 error code but when you use that method to write friendly URLs, you change that 404 code to 200 (which means the page exists even if it doesn&#8217;t).</em></p>
<h3>Friendly URLs Using PATH_INFO</h3>
<p>This is probably the easiest method although it&#8217;s not my favorite (I&#8217;ll explain why later). Suppose you have this URL :</p>
<blockquote><p><em>http://www.mydomain.com/articles.php?category=39&amp;article=27</em></p></blockquote>
<p>Using PATH INFO will give you a URL similar to this:</p>
<blockquote><p><em>http://www.mydomain.com/articles.php/39/27</em></p></blockquote>
<p>When Apache receives a request for this URL, it will first look for a file or folder named &#8220;27&#8243;. As it doesn&#8217;t exist, it will look for a file or folder named &#8220;39&#8243;. As it doesn&#8217;t exist neither, it will look for a file named &#8220;article.php&#8221;, which exists, and will call that script. Upon execution of that script, Apache will store the path <em>articles.php/39/27</em> into a global variable called <em>$PATH_INFO</em>.</p>
<p>At this point, what you want to do is split that variable into an array like this :</p>
<blockquote class="SourceCode"><p>&lt;? $myvars = explode(&#8216;/&#8217;, $PATH_INFO); ?&gt;</p></blockquote>
<p align="left">This way, you will be able to access each variables like this :</p>
<blockquote class="SourceCode">
<p align="left">&lt;?</p>
<blockquote class="SourceCode"><p>echo myvars[0]; // returns &#8220;articles.php&#8221;<br />
echo myvars[1]; // returns 39<br />
echo myvars[2]; // returns 27</p></blockquote>
<p>?&gt;</p></blockquote>
<p>Now simply rename your variables to what your PHP script expects to process and you&#8217;re done.</p>
<p>If the $PATH_INFO variable is empty, this may be because your need to turn on this feature in your .htaccess file:</p>
<blockquote class="SourceCode"><p>AcceptPathInfo On</p></blockquote>
<p>To do this, you must also ensure that your web hosting provider allows you to override Apache&#8217;s main configuration.</p>
<p>The reason why this is not my favorite method is because the URL still needs to call the script and it doesn&#8217;t look as nice as a static page URL:</p>
<blockquote><p><em>http://www.mydomain.com/<strong>articles.php</strong>/39/27</em></p></blockquote>
<h3>Friendly URLs using ForceType</h3>
<p>This method allows you to hide your script&#8217;s extension (.php). To make a long story short, Apache is configured to parse only <em>.php</em> files as PHP (and maybe .php3, .php4 also). Basically, what you&#8217;re going to do is tell Apache to parse files with no extensions as PHP through your .htaccess file :</p>
<blockquote class="SourceCode"><p>&lt;Files articles&gt;<br />
ForceType application/x-httpd-php<br />
&lt;/Files&gt;</p></blockquote>
<p>This way you&#8217;re going to be able to write URLs like this:</p>
<blockquote><p><em><a href="http://www.mydomain.com/articles/39/27">http://www.mydomain.com/articles/39/27</a></em></p></blockquote>
<p>All that&#8217;s left to do is to get the rest of the path through the $PATH_INFO like you&#8217;ve seen in the previous method.</p>
<h3>Friendly URLs with mod_rewrite</h3>
<p>This is my favorite method although it&#8217;s probably the most complex one. Mod_rewrite is an Apache module which lets you rewrite URLs through <a target="_blank" href="http://en.wikipedia.org/wiki/Regular_expression">regular expressions</a> in an .htaccess file. In my opinion, this is the most powerful and flexible way to use friendly URLs but novices might not be comfortable with this one.</p>
<p><em>In order to use mod_rewrite, you must make sure that your web hosting provider has enabled this feature in Apache&#8217;s configuration file.</em></p>
<p>So let&#8217;s pretend we want to transform this dynamic URL into a friendly URL:</p>
<blockquote><p><em>http://www.mydomain.com/articles.php?category=39&amp;article=27</em></p></blockquote>
<p>The first thing to do would be to add a field to both our &#8221;article&#8221; and &#8220;category&#8221; table in our database. That new field will contain a &#8220;friendly&#8221; identifier for each record and must be unique. So instead of identifying our article by ID #27 and the category by ID #39, we would identify them by more friendly terms so that our URL could look something like:</p>
<blockquote><p><em>http://www.mydomain.com/articles/tutorials/dreamweaver.html</em></p></blockquote>
<p>So here our category is identified by &#8220;tutorials&#8221; and &#8220;dreamweaver&#8221; would be the article identifier. Got it? Great.</p>
<p>So now we need to rewrite the above URL so that we can pass our identifiers to our PHP script.</p>
<p>Here&#8217;s what our .htaccess file may look like:</p>
<p class="SourceCode">&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteRule ^articles/(.*)/(.*).html$   articles.php?categ=$1&amp;article=$2 [L]<br />
&lt;/IfModule&gt;</p>
<p>Let&#8217;s break down these instructions:</p>
<ul>
<li><strong>IfModule mod_rewrite.c</strong> : this makes sure that the mod_rewrite module is enabled.</li>
<li><strong>RewriteEngine On</strong> : turns on the rewrite engine (duh!).</li>
<li><strong>RewriteBase</strong> : explicitly sets the base URL for per-directory rewrites.</li>
</ul>
<p>The RewriteRule line is the most crucial one so here&#8217;s a detailed break down:</p>
<ul>
<li><strong>^</strong> : this indicates the start of line.</li>
<li><strong>articles</strong> : means that the URL we want to rewrite MUST START by &#8220;articles/&#8221; (ie.: <a href="http://www.mydomain.com/articles/tutorials/dreamweaver.html">http://www.mydomain.com/<strong>articles/</strong>tutorials/dreamweaver.html</a>)</li>
<li><strong>(.*)/</strong> : this our first variable. Everything that comes before the first slash is put into a variable named $1. That means our category identifier will be stored into $1.</li>
<li><strong>(.*).html</strong> : this is our second variable. Everything until &#8220;.html&#8221; will be stored into another variable named $2. Our article identifier will be stored into $2.</li>
<li><strong>$</strong> : this means that nothing must come after &#8220;.html&#8221; or else the URL will not be processed.</li>
<li><strong>articles.php?categ=$1&amp;article=$2</strong> : this is where we call our PHP script. Both $1 and $2 variable are going to be replaced by their respective values (see above).</li>
<li><strong>[L]</strong> : the [L] instruction makes sure that the rewrite engine will stop processing the URL after this statement. [L] means &#8220;Last&#8221;.</li>
</ul>
<p>Now all that&#8217;s left to do is to query your database according to values you passed to it through URL rewriting.</p>
<p>There is a lot more to mod_rewrite and regular expressions so have a look at the following links:</p>
<ul>
<li><a target="_blank" href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">Apache&#8217;s mod_rewrite documentation</a></li>
<li><a target="_blank" href="http://www.regular-expressions.info/">Regular expressions (regex) tutorials, examples and reference</a></li>
</ul>
<p>And of course, you can also <a target="_blank" href="http://www.thewebmasterscafe.net/answers/your-questions-answered.html">ask me your questions</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterscafe.net/seo/search-engine-friendly-urls.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Submit Multiple Pages to Major Search Engines</title>
		<link>http://www.thewebmasterscafe.net/seo/submit-multiple-pages-through-sitemaps.html</link>
		<comments>http://www.thewebmasterscafe.net/seo/submit-multiple-pages-through-sitemaps.html#comments</comments>
		<pubDate>Mon, 03 Sep 2007 15:50:51 +0000</pubDate>
		<dc:creator>Stephane</dc:creator>
				<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.thewebmasterscafe.net/seo/submit-multiple-pages-through-sitemaps.html</guid>
		<description><![CDATA[If you have a large database-driven website with multiple pages, you may find that the major search engines are only indexing a small portion of your content and leaving behind some less popular pages. I happened to have this problem with one of my websites, HomeMusician.net, which has over 15,000 pages. Google had indexed about [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a large database-driven website with multiple pages, you may find that the major search engines are only indexing a small portion of your content and leaving behind some less popular pages. I happened to have this problem with one of my websites, <a href="http://www.homemusician.net" target="_blank">HomeMusician.net</a>, which has over 15,000 pages. Google had indexed about 1000 pages and never got to index some less popular portions of the site.</p>
<h3>Introducing Google Sitemaps</h3>
<p>In June 2005, Google introduced Sitemaps 0.84 so web developers could publish lists of links from across their sites. About a year and a half later, Google, MSN and Yahoo announced joint support for the Sitemaps Protocol and the schema was changed to 0.90. In April 2007, Ask.com and IBM also announced support for Sitemaps and Google, Yahoo and MSN announced auto-discovery for sitemaps through robots.txt.</p>
<p>The <strong>Sitemaps Protocol </strong>allows a webmaster to inform search engines about URLs on a website that are available for crawling. Basically, a Sitemap is an XML file that lists the URLs for a site. In addition to listing URLs for a site, the webmaster can include additional information about each URL such as: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site.</p>
<p>Here&#8217;s a sample Sitemap file :</p>
<blockquote class="SourceCode"><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;urlset xmlns=&#8221;<a href="http://www.google.com/schemas/sitemap/0.84">http://www.google.com/schemas/sitemap/0.84</a>&#8220;&gt;<br />
&lt;url&gt;<br />
&lt;loc&gt;http://www.thewebmasterscafe.net/&lt;/loc&gt;<br />
&lt;lastmod&gt;2007-09-03T13:15:53+00:00&lt;/lastmod&gt;<br />
&lt;changefreq&gt;daily&lt;/changefreq&gt;<br />
&lt;priority&gt;1&lt;/priority&gt;<br />
&lt;/url&gt;<br />
&lt;url&gt;<br />
&lt;loc&gt;http://www.thewebmasterscafe.net/news/submit-link.html&lt;/loc&gt;<br />
&lt;lastmod&gt;2007-09-03T09:15:53+00:00&lt;/lastmod&gt;<br />
&lt;changefreq&gt;weekly&lt;/changefreq&gt;<br />
&lt;priority&gt;0.1&lt;/priority&gt;<br />
&lt;/url&gt;<br />
&lt;url&gt;<br />
&lt;loc&gt;http://www.thewebmasterscafe.net/publicize<br />
/google-adwords-for-dummies-pt1.html&lt;/loc&gt;<br />
&lt;lastmod&gt;2007-09-02T21:46:05+00:00&lt;/lastmod&gt;<br />
&lt;changefreq&gt;weekly&lt;/changefreq&gt;<br />
&lt;priority&gt;0.1&lt;/priority&gt;<br />
&lt;/url&gt;<br />
&lt;/urlset&gt;</p></blockquote>
<p>This file must be saved at the root of your website in .xml format or it can be compressed in a gzip archive. Your Sitemap should then be accessible at http://www.yourdomain.com/sitemap.xml or http://www.yourdomain.com/sitemap.xml.gz .</p>
<h3>Generating Your Sitemap</h3>
<p>Even though some web developers will make their own Sitemap generator, there are some utilities that are available for this task. You can get <a href="https://www.google.com/webmasters/tools/docs/en/sitemap-generator.html" target="_blank">Google&#8217;s Sitemap Generator</a> from the <a href="https://www.google.com/webmasters/tools/siteoverview" target="_blank">Google Webmaster Tools</a>. The script is written in <a href="http://www.python.org/" target="_blank">Python</a>so you should be able to run it on most plateforms. I liked using this script because it allows you to submit the Sitemap automatically upon generation. Be careful when using this feature because submitting your Sitemap too often can be considered as abuse. The &#8220;-testing&#8221; switch prevents the script from submitting the Sitemap automatically.</p>
<p>If you are generating content from a <a href="http://www.wordpress.org" target="_blank">WordPress</a> blog, you can use <a href="http://www.arnebrachhold.de/2005/06/05/google-sitemaps-generator-v2-final" target="_blank">Google Sitemap Generator for WordPress</a> (<em>it is not a Google product</em>). Just make sure you read the readme.txt file carefully. I&#8217;ve installed version 3.0b9 on a WordPress 2.2 blog and it worked fine.</p>
<p>There are plenty of other tools available, just make a search on Google.</p>
<h3>Submitting Your Sitemap</h3>
<p>Before you go ahead and submit your sitemap, you might want to validate it&#8217;s content. Many validation tools such as <a href="http://www.smart-it-consulting.com/internet/google/submit-validate-sitemap/index.htm" target="_blank">Free Google Sitemap Validator and Submitter</a>. Once you validated your Sitemap, you can submit it directly to search engines :</p>
<ul>
<li><a href="http://www.google.com/webmasters/sitemaps/" target="_blank">Google Webmaster Tools</a></li>
<li><a href="http://siteexplorer.search.yahoo.com/" target="_blank">Yahoo! Site Explorer</a></li>
<li><a href="http://about.ask.com/en/docs/about/webmasters.shtml" target="_blank">Ask.com : Webmasters</a></li>
</ul>
<p>Alternatively, you can add a &#8220;Sitemap&#8221; directive to your robots.txt file :</p>
<blockquote class="SourceCode"><p>Sitemap : /sitemap.xml</p></blockquote>
<h3>Where can I find more information on the Sitemaps Protocol?</h3>
<p>More technical information can be found over at <a href="http://www.sitemaps.org/">http://www.sitemaps.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterscafe.net/seo/submit-multiple-pages-through-sitemaps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Predicting Your Website&#8217;s Future PR</title>
		<link>http://www.thewebmasterscafe.net/seo/google-pagerank-tools.html</link>
		<comments>http://www.thewebmasterscafe.net/seo/google-pagerank-tools.html#comments</comments>
		<pubDate>Mon, 27 Aug 2007 13:58:10 +0000</pubDate>
		<dc:creator>Stephane</dc:creator>
				<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.thewebmasterscafe.net/building-traffic/google-pagerank-tools.html</guid>
		<description><![CDATA[While some of you already know, Google&#8217;s PageRank is a link analysis algorithm that assigns a numerical weighting to each of your website&#8217;s pages. This factor can affect a number of things such as your website&#8217;s position in Google&#8217;s search results or your AdWords PPC campaigns (read more about Google&#8217;s PageRank on Wikipedia). Lately I [...]]]></description>
			<content:encoded><![CDATA[<p>While some of you already know, Google&#8217;s PageRank is a link analysis algorithm that assigns a numerical weighting to each of your website&#8217;s pages. This factor can affect a number of things such as your website&#8217;s position in Google&#8217;s search results or your AdWords PPC campaigns (<a target="_blank" href="http://en.wikipedia.org/wiki/PageRank">read more about Google&#8217;s PageRank on Wikipedia</a>).</p>
<p>Lately I stumbled onto a useful tool that can predict your website&#8217;s future PR. As this website (TheWebmastersCafe.net) is pretty new, it&#8217;s currently stuck into Google&#8217;s &#8220;sandbox effect&#8221;. This is the probation period where your website still hasn&#8217;t got a PR from Google so I wanted to know what my blog&#8217;s PR would be in the future. Unfortunately, I haven&#8217;t got enough backlinks yet so the prediction isn&#8217;t good. On the other hand, my other website, <a target="_blank" href="http://www.homemusician.net">HomeMusician.net</a>, has over 500 backlinks but it&#8217;s PR probably won&#8217;t move but still, it has a PR 4 which isn&#8217;t bad.</p>
<p>Here is the prediction tool as well as some other useful PR-related links :</p>
<p><strong>PageRank Prediction</strong><br />
<a target="_blank" href="http://www.iwebtool.com/pagerank_prediction">http://www.iwebtool.com/pagerank_prediction</a></p>
<p><strong>Live PageRank</strong><br />
<a target="_blank" href="http://livepr.raketforskning.com/">http://livepr.raketforskning.com/</a></p>
<p><strong>Google PageRank Checker</strong><br />
<a target="_blank" href="http://www.prchecker.info/check_page_rank.php">http://www.prchecker.info/check_page_rank.php</a></p>
<p><strong>iWebTool Page Rank Checker</strong><br />
<a target="_blank" href="http://www.iwebtool.com/pagerank_checker">http://www.iwebtool.com/pagerank_checker</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterscafe.net/seo/google-pagerank-tools.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

