<?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>Search engine script &#187; .htaccess</title>
	<atom:link href="http://searchenginescript.biz/tag/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://searchenginescript.biz</link>
	<description></description>
	<lastBuildDate>Tue, 22 May 2012 07:10:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>I&#8217;M USING A SCRIPT IN MY .HTACCESS FILE WHICH POINTS ALL LINKS FROM MY &#8220;NON-WWW&#8221; SITE TO MY WWW SITE.</title>
		<link>http://searchenginescript.biz/im-using-a-script-in-my-htaccess-file-which-points-all-links-from-my-non-www-site-to-my-www-site-2/</link>
		<comments>http://searchenginescript.biz/im-using-a-script-in-my-htaccess-file-which-points-all-links-from-my-non-www-site-to-my-www-site-2/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 20:09:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FAQ]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[from]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[nonwww]]></category>
		<category><![CDATA[points]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[using]]></category>

		<guid isPermaLink="false">http://searchenginescript.biz/im-using-a-script-in-my-htaccess-file-which-points-all-links-from-my-non-www-site-to-my-www-site-2/</guid>
		<description><![CDATA[Question by GSG: I&#8217;m using a script in my .htaccess file which points all links from my &#8220;non-www&#8221; site to my www site. I&#8217;m using: # Start non-www page protection # RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$ 1 [L,R=301] # End non-www page protection # Is this the correct format,]]></description>
			<content:encoded><![CDATA[<a target="_blank" href="http://your-own-search.com/"  target="_blank"><img src="http://searchenginescript.biz/se.jpg" alt="Search engine" border="0" /></a><p><strong><i>Question by GSG</i>: <br />I&#8217;m using a script in my .htaccess file which points all links from my &#8220;non-www&#8221; site to my www site.</strong><br />
I&#8217;m using:</p>
<p># Start non-www page protection #<br />
<IfModule mod_rewrite.c><br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]<br />
RewriteRule ^(.*)$   http://www.mysite.com/$  1 [L,R=301]<br />
</IfModule><br />
# End non-www page protection #</p>
<p>Is this the correct format, and will all links now point just to the www version just from the time that I do this and upload the new .htaccess file, or will all links (and the page rank boost associated with it) become retrospective? Will I see a boost in rank immediately?</p>
<p>I&#8217;ve also heard that the search engines see a www.mysite.com version and a www.mysite.com/ version. Will my script take care of this as well, or do I have to add something else? (I cannot see whether the script does this or not as I am not a coder!)</p>
<p>For .co.uk domains do I just alternative .co.uk for .com in each case?</p>
<p><span id="more-1576"></span><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><i>Answer by Civic SEO</i><br/>RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^yourdomain\.co.uk$   [NC]<br />
RewriteRule ^(.*)$   http://www.yourdomain.co.uk/$  1 [R=301,L] </p>
<p>That above is the only code you need to redirect non-www to www in your .htaccess file. Yes you can change *.com to *.co.uk to get the same results, I made the code already valid for that. Change &#8220;yourdomain&#8221; to your domains name.</p>
<p>Yes, this will prevent duplicate content issues with search engines regarding two URLs having the same content. All non-www requests will be 301 redirected to their www counterpart. Results will take time, you might not even yeild none but a more proper internal link structure.</p>
<p>
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<strong>What do you think? Answer below!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://searchenginescript.biz/im-using-a-script-in-my-htaccess-file-which-points-all-links-from-my-non-www-site-to-my-www-site-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;M USING A SCRIPT IN MY .HTACCESS FILE WHICH POINTS ALL LINKS FROM MY &#8220;NON-WWW&#8221; SITE TO MY WWW SITE.</title>
		<link>http://searchenginescript.biz/im-using-a-script-in-my-htaccess-file-which-points-all-links-from-my-non-www-site-to-my-www-site/</link>
		<comments>http://searchenginescript.biz/im-using-a-script-in-my-htaccess-file-which-points-all-links-from-my-non-www-site-to-my-www-site/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 06:13:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FAQ]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[from]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[nonwww]]></category>
		<category><![CDATA[points]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[using]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I&#8217;m using: # Start non-www page protection # RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301] # End non-www page protection # Is this the correct format, and will all links now point just to the www version just from the time that I do this and upload the new .htaccess]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using:</p>
<p># Start non-www page protection #<br />
<IfModule mod_rewrite.c><br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]<br />
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]<br />
</IfModule><br />
# End non-www page protection #</p>
<p>Is this the correct format, and will all links now point just to the www version just from the time that I do this and upload the new .htaccess file, or will all links (and the page rank boost associated with it) become retrospective? Will I see a boost in rank immediately?</p>
<p>I&#8217;ve also heard that the search engines see a www.mysite.com version and a www.mysite.com/ version. Will my script take care of this as well, or do I have to add something else? (I cannot see whether the script does this or not as I am not a coder!)</p>
<p>For .co.uk domains do I just alternative .co.uk for .com in each case?</p>
<p><span id="more-664"></span><!-- pingbacker_start --><!-- pingbacker_end --></p>
]]></content:encoded>
			<wfw:commentRss>http://searchenginescript.biz/im-using-a-script-in-my-htaccess-file-which-points-all-links-from-my-non-www-site-to-my-www-site/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

