<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: ASP: NON-WWW 301 Redirect on IIS</title>
	<atom:link href="http://www.davidbehan.com/blog/index.php/non-www-301-redirect-on-iis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/</link>
	<description>David Behan's Blog on web design, the Internet, business and company news</description>
	<lastBuildDate>Wed, 08 Sep 2010 15:26:52 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nik</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-39607</link>
		<dc:creator>Nik</dc:creator>
		<pubDate>Sun, 24 Jan 2010 21:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-39607</guid>
		<description>you can use IIRF filter. 

RewriteCond  %{HTTP_HOST}  ^domain\.com$
RedirectRule ^/(.*)$       http:/www.domain.com/$1         [R=301]</description>
		<content:encoded><![CDATA[<p>you can use IIRF filter. </p>
<p>RewriteCond  %{HTTP_HOST}  ^domain\.com$<br />
RedirectRule ^/(.*)$       http:/www.domain.com/$1         [R=301]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marky</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-38192</link>
		<dc:creator>marky</dc:creator>
		<pubDate>Tue, 01 Dec 2009 02:16:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-38192</guid>
		<description>hi! David,
I&#039;ve tested your script and works fine... However my requirement is from http://www.domain.com to http://domain.com Any help of what should change along the line to make it work as I intended.
Thank for the help.</description>
		<content:encoded><![CDATA[<p>hi! David,<br />
I&#8217;ve tested your script and works fine&#8230; However my requirement is from <a href="http://www.domain.com">http://www.domain.com</a> to <a href="http://domain.com">http://domain.com</a> Any help of what should change along the line to make it work as I intended.<br />
Thank for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Free</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-37381</link>
		<dc:creator>Free</dc:creator>
		<pubDate>Tue, 03 Nov 2009 00:58:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-37381</guid>
		<description>Hi David ;

thank you so much for your great code;

with &quot; svrNewUrl = replace(svrNewUrl,”default.asp”,”&quot;)   &quot;

i research it on the net since a few months... 
thank you thank you, again.. it s worked good</description>
		<content:encoded><![CDATA[<p>Hi David ;</p>
<p>thank you so much for your great code;</p>
<p>with &#8221; svrNewUrl = replace(svrNewUrl,”default.asp”,”&#8221;)   &#8221;</p>
<p>i research it on the net since a few months&#8230;<br />
thank you thank you, again.. it s worked good</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-36679</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 14 Oct 2009 14:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-36679</guid>
		<description>I&#039;m having to deal with this issue for two different classic ASP sites at the same time - one on a dedicated server and the other on shared hosting.

One ASP/ASP.Net shared hosting company that offers the IIS Mod-Rewrite pre-installed on its servers is CrystalTech.

Your suggestion for dealing with non-www redirect for ASP is about the best one I can find.  Thanks.</description>
		<content:encoded><![CDATA[<p>I&#8217;m having to deal with this issue for two different classic ASP sites at the same time &#8211; one on a dedicated server and the other on shared hosting.</p>
<p>One ASP/ASP.Net shared hosting company that offers the IIS Mod-Rewrite pre-installed on its servers is CrystalTech.</p>
<p>Your suggestion for dealing with non-www redirect for ASP is about the best one I can find.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-35577</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 23 Aug 2009 18:17:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-35577</guid>
		<description>Hi Tony,

It shouldn&#039;t add default.asp as there is a line in the code that actually removes that from the new url, i.e.

svrNewUrl = replace(svrNewUrl,&quot;default.asp&quot;,&quot;&quot;)

The only thing I can think of is that it&#039;s adding Default.asp maybe and isn&#039;t removing it properly then.

If so, change this line:

svrNewUrl = svrNewUrl &amp; svrHost &amp; svrUrl

to:

svrNewUrl = lcase(svrNewUrl &amp; svrHost &amp; svrUrl)

and give it another go. If you want to pop me a url to see a live example, I might be able to diagnose.

HTH, Dave</description>
		<content:encoded><![CDATA[<p>Hi Tony,</p>
<p>It shouldn&#8217;t add default.asp as there is a line in the code that actually removes that from the new url, i.e.</p>
<p>svrNewUrl = replace(svrNewUrl,&#8221;default.asp&#8221;,&#8221;")</p>
<p>The only thing I can think of is that it&#8217;s adding Default.asp maybe and isn&#8217;t removing it properly then.</p>
<p>If so, change this line:</p>
<p>svrNewUrl = svrNewUrl &#038; svrHost &#038; svrUrl</p>
<p>to:</p>
<p>svrNewUrl = lcase(svrNewUrl &#038; svrHost &#038; svrUrl)</p>
<p>and give it another go. If you want to pop me a url to see a live example, I might be able to diagnose.</p>
<p>HTH, Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-35476</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Tue, 18 Aug 2009 15:09:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-35476</guid>
		<description>Hi David,

Thanks for the script! It works perfect on all pages except the home page. The problem is; the script is adding default.asp to the domain. 

Example: http://domain.com turns into http://www.domain.com/default.asp

How do I remove Default.asp?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>Thanks for the script! It works perfect on all pages except the home page. The problem is; the script is adding default.asp to the domain. </p>
<p>Example: <a href="http://domain.com">http://domain.com</a> turns into <a href="http://www.domain.com/default.asp">http://www.domain.com/default.asp</a></p>
<p>How do I remove Default.asp?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-35381</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 14 Aug 2009 08:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-35381</guid>
		<description>Yeah, I&#039;ll have to have a look why that&#039;s happening. CMS probably converted those automatically on save. Glad you like it.</description>
		<content:encoded><![CDATA[<p>Yeah, I&#8217;ll have to have a look why that&#8217;s happening. CMS probably converted those automatically on save. Glad you like it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-35237</link>
		<dc:creator>Brendan</dc:creator>
		<pubDate>Sat, 08 Aug 2009 15:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-35237</guid>
		<description>I work as a programmer for an SEO firm. This is a great script to have when most clients are on Shared Hosts, and do not have access to the IIS settings. Thanks Dave! This script worked beautifully with no configuration needed. Just note, when I copied and pasted, the comment ticks (&#039;) became, a different symbol (`) so it raised an internal server error, quickly fixed.</description>
		<content:encoded><![CDATA[<p>I work as a programmer for an SEO firm. This is a great script to have when most clients are on Shared Hosts, and do not have access to the IIS settings. Thanks Dave! This script worked beautifully with no configuration needed. Just note, when I copied and pasted, the comment ticks (&#8217;) became, a different symbol (`) so it raised an internal server error, quickly fixed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: StoreCrowd</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-33205</link>
		<dc:creator>StoreCrowd</dc:creator>
		<pubDate>Fri, 05 Jun 2009 05:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-33205</guid>
		<description>Thanks for this tutorial Dave, it came in really useful for a client.</description>
		<content:encoded><![CDATA[<p>Thanks for this tutorial Dave, it came in really useful for a client.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: triple5iks</title>
		<link>http://www.davidbehan.com/blog/non-www-301-redirect-on-iis/comment-page-1/#comment-20147</link>
		<dc:creator>triple5iks</dc:creator>
		<pubDate>Sun, 25 Jan 2009 02:31:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidbehan.com/blog/?p=34#comment-20147</guid>
		<description>omg...

thank you very much  ^:)^

working great ;)</description>
		<content:encoded><![CDATA[<p>omg&#8230;</p>
<p>thank you very much  ^:)^</p>
<p>working great <img src='http://www.davidbehan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
