<?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>Master Site Manager SEO Ranking Software &#187; Htaccess</title>
	<atom:link href="http://www.mastersitemanager.com/tag/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mastersitemanager.com</link>
	<description>Save hours tracking your SEO stats with Master Site Manager SEO tracking software</description>
	<lastBuildDate>Tue, 22 Feb 2011 19:39:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Adding a trailing slash to requested URLs</title>
		<link>http://www.mastersitemanager.com/868/adding-trailing-slash-to-requested-urls/</link>
		<comments>http://www.mastersitemanager.com/868/adding-trailing-slash-to-requested-urls/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 22:01:56 +0000</pubDate>
		<dc:creator>SEO Stats Tracking</dc:creator>
				<category><![CDATA[SEO News & Tips]]></category>
		<category><![CDATA[Content Problems]]></category>
		<category><![CDATA[Htaccess]]></category>
		<category><![CDATA[Mod Rewrite]]></category>
		<category><![CDATA[Page Content]]></category>
		<category><![CDATA[Redirect Url]]></category>
		<category><![CDATA[Request Uri]]></category>
		<category><![CDATA[Rewrite Rule]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://www.mastersitemanager.com/868/868/</guid>
		<description><![CDATA[Here&#8217;s the problem: Some search engines remove the trailing slash from urls that look like directories &#8211; e.g. Yahoo does it for example. However, you might find that this could result into duplicated content problems when the same page content is accessible under different urls. And clearly you don&#8217;t want that. But if you&#8217;re using [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Here&#8217;s the problem:</strong></p>
<p>Some search engines remove the trailing slash from urls that look like directories &#8211; e.g. Yahoo does it for example.</p>
<p>However, you might find that this could result into duplicated content problems when the same page content is accessible under different urls.</p>
<p>And clearly you don&#8217;t want that.</p>
<p>But if you&#8217;re using Apache on your web server, there&#8217;s a simple solution.</p>
<p>Let&#8217;s have a look at an example: enarion.net/google/ is indexed in Yahoo as enarion.net/google &#8211; which would result in two urls with the same content.</p>
<p><strong>Solution:</strong></p>
<p>The solution is to create a .htaccess rewrite rule that adds the trailing slashes to these urls. Example &#8211; redirect all urls that do not have a trailing slash to urls with a trailing slash:</p>
<p style="padding-left: 30px;">RewriteEngine On<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_URI} !example.php<br />
RewriteCond %{REQUEST_URI} !(.*)/$<br />
RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301]</p>
<p>Explanation of the add trailing slash .htaccess rewrite rule:</p>
<p>The first line tells Apache that this is code for the rewrite engine of the mod_rewrite module of Apache. The 2nd line sets the current directory as page root. But the interesting part is:</p>
<p>RewriteCond %{REQUEST_FILENAME} !-f</p>
<p>makes sure that existing files will not get a slash added. You shouldn&#8217;t do the same with directories since this would exlude the rewrite behaviour for existing directories. The line</p>
<p>RewriteCond %{REQUEST_URI} !example.php</p>
<p>exludes a sample url that should not be rewritten. This is just an example. If you do not have a file or url that should not be rewritten, remove this line. The condition:</p>
<p>RewriteCond %{REQUEST_URI} !(.*)/$</p>
<p>and finally fires when a url does not contain a trailing slash.</p>
<p>Now we need to redirect the urls without the trailing slash: pre&gt; RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301] does the 301 redirect to the url, with the trailing slash appended.</p>
<p>You should replace domain.com with your url. Make sure that you stick with the right domain name; if unsure, have a look at this article.</p>
<p>Pretty cool, eh?</p>
<p>This article was referenced with gratitude from enarion.net.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mastersitemanager.com%2F868%2Fadding-trailing-slash-to-requested-urls%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px;margin-top:5px;"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.mastersitemanager.com/868/adding-trailing-slash-to-requested-urls/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Migrating domain content using .htaccess:</title>
		<link>http://www.mastersitemanager.com/863/migrating-with-htaccess/</link>
		<comments>http://www.mastersitemanager.com/863/migrating-with-htaccess/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 21:55:15 +0000</pubDate>
		<dc:creator>SEO Monitoring Software</dc:creator>
				<category><![CDATA[SEO News & Tips]]></category>
		<category><![CDATA[Domain Content]]></category>
		<category><![CDATA[Domain Redirect]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Htaccess]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Trustrank]]></category>

		<guid isPermaLink="false">http://www.mastersitemanager.com/?p=863</guid>
		<description><![CDATA[Ok here&#8217;s the problem: You have an old website that can be found under olddomain.com and you have a new website that is accessible under newdomain.com. Copying the content of the old website to the new website is the first step &#8211; but what comes after that? Doing a &#8220;301 moved permanently&#8221; redirect from the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Ok here&#8217;s the problem:</strong></p>
<p>You have an old website that can be found under olddomain.com and you have a new website that is accessible under newdomain.com.</p>
<p>Copying the content of the old website to the new website is the first step &#8211; but what comes after that?</p>
<p>Doing a &#8220;301 moved permanently&#8221; redirect from the old domain to the new domain &#8211; offers several advantages, and it&#8217;s not tough to do.</p>
<ol>
<li> Users will automatically be redirected to the new domain &#8211; you do not have to inform them.</li>
<li> Search engines will be redirected to the new domain and all related information will be moved to the new domain (but this might take some time).</li>
<li> Google&#8217;s PageRank ™ will be transfered to the new domain, as well as other internal information that is being used to set the position of pages in the search engine result pages (serp&#8217;s) &#8211; like TrustRank .</li>
</ol>
<p>So here the solution:</p>
<p>Create a 301 redirect for all http requests that are going to the old domain.</p>
<ul>
<li>Example 1 &#8211; Redirect from olddomain.com to www.newdomain.com:</li>
</ul>
<p style="padding-left: 30px;">RewriteEngine On<br />
RewriteCond %{HTTP_HOST} !newdomain.com$ [NC]<br />
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]</p>
<p>This is useful when you use www.newdomain.com as your new domain name (see also this article about redirecting www and non-www domains). If not &#8211; use the code of example 2.</p>
<ul>
<li>Example 2 &#8211; Redirect from olddomain.com to newdomain.com:</li>
</ul>
<p style="padding-left: 30px;">RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} !newdomain.com$ [NC]<br />
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]</p>
<p>See, told you it was easy <img src='http://www.mastersitemanager.com/wp-includes/images/smilies/icon_wink.gif' alt="icon wink Migrating domain content using .htaccess:" class='wp-smiley' title="Migrating domain content using .htaccess:" /> </p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mastersitemanager.com%2F863%2Fmigrating-with-htaccess%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px;margin-top:5px;"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.mastersitemanager.com/863/migrating-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

