<?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>Thijs Lensselink&#039;s Blog &#187; slash</title>
	<atom:link href="http://lenss.nl/tag/slash/feed/" rel="self" type="application/rss+xml" />
	<link>http://lenss.nl</link>
	<description>Webdevelopment and stuff...</description>
	<lastBuildDate>Sun, 05 Feb 2012 11:39:43 +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>Forcing a trailing slash with mod_rewrite</title>
		<link>http://lenss.nl/2009/02/forcing-a-trailing-slash-with-mod_rewrite/</link>
		<comments>http://lenss.nl/2009/02/forcing-a-trailing-slash-with-mod_rewrite/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 11:29:37 +0000</pubDate>
		<dc:creator>Thijs Lensselink</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[slash]]></category>
		<category><![CDATA[trailing]]></category>

		<guid isPermaLink="false">http://lenss.nl/?p=276</guid>
		<description><![CDATA[I&#8217;m doing some SEO optimization for a couple of websites. And one of the small steps is to force a trailing slash on all URL&#8217;s that do not point to a file on the server. The reason I&#8217;m doing this is to go around the duplicate content problem. /trip/80 /trip/80/ Both point to the same [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing some <a href="http://en.wikipedia.org/wiki/Search_engine_optimization">SEO</a> optimization for a couple of websites. And one of the small steps is to force a trailing slash on all URL&#8217;s that do not point to a file on the server. The reason I&#8217;m doing this is to go around the duplicate content problem.</p>
<blockquote><p>/trip/80<br />
/trip/80/</p></blockquote>
<p>Both point to the same content. But a <a href="http://en.wikipedia.org/wiki/Web_crawler">crawler</a> would see this as two different URL&#8217;s. Which off course is correct. But this can lead to duplicate content being indexed in search engines. Which could result in penalties for the site in question. So to fix this problem we add three simple lines to the main .htaccess file</p>
<blockquote><p># If a requested file does not exists<br />
RewriteCond %{REQUEST_FILENAME} !-f</p>
<p># If a requested directory does not exist<br />
RewriteCond %{REQUEST_FILENAME} !-d</p>
<p># Force a trailing slash to the request<br />
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://lenss.nl/2009/02/forcing-a-trailing-slash-with-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
