<?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"
	>
<channel>
	<title>Comments on: Redirect a subdomain to a directory using .htaccess</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/</link>
	<description></description>
	<pubDate>Fri, 21 Nov 2008 21:59:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: djoey</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-587634</link>
		<dc:creator>djoey</dc:creator>
		<pubDate>Tue, 29 Jul 2008 19:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-587634</guid>
		<description>@John you could use the following code before your last bit of working code, to redirect www.domain.com to domain.com:

I used your code for redirecting subdomains, and i added this before it so that www.domain.com will first redirect. Then the subdomain rules are carried out if necessary.

RewriteCond %{HTTP_HOST} ^www\.djoey\.net$ [NC]
RewriteRule ^(.*)$ http://djoey.net/$1 [L,R=301]</description>
		<content:encoded><![CDATA[<p>@John you could use the following code before your last bit of working code, to redirect <a href="http://www.domain.com" rel="nofollow">http://www.domain.com</a> to domain.com:</p>
<p>I used your code for redirecting subdomains, and i added this before it so that <a href="http://www.domain.com" rel="nofollow">http://www.domain.com</a> will first redirect. Then the subdomain rules are carried out if necessary.</p>
<p>RewriteCond %{HTTP_HOST} ^www\.djoey\.net$ [NC]<br />
RewriteRule ^(.*)$ <a href="http://djoey.net/1" rel="nofollow">http://djoey.net/1</a> [L,R=301]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: animesh</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-576484</link>
		<dc:creator>animesh</dc:creator>
		<pubDate>Mon, 02 Jun 2008 03:47:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-576484</guid>
		<description>i have been trying for several day and still unaware to solve the sub domain
problem.
 the code as follow i have use as far got help from different source. 



RewriteEngine On


RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{HTTP_HOST} !^www\.sportalocity\.com
RewriteCond %{HTTP_HOST} ^([^.]+)\.sportalocity\.com
RewriteRule ^([^.]+) /index.php?sitename=%1 [L]



RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{HTTP_HOST} !^www\.sportalocity\.com
RewriteRule ^([^.]+) /index.php?sitename="home" [L]</description>
		<content:encoded><![CDATA[<p>i have been trying for several day and still unaware to solve the sub domain<br />
problem.<br />
 the code as follow i have use as far got help from different source. </p>
<p>RewriteEngine On</p>
<p>RewriteCond %{REQUEST_URI} !^/index\.php<br />
RewriteCond %{HTTP_HOST} !^www\.sportalocity\.com<br />
RewriteCond %{HTTP_HOST} ^([^.]+)\.sportalocity\.com<br />
RewriteRule ^([^.]+) /index.php?sitename=%1 [L]</p>
<p>RewriteCond %{REQUEST_URI} !^/index\.php<br />
RewriteCond %{HTTP_HOST} !^www\.sportalocity\.com<br />
RewriteRule ^([^.]+) /index.php?sitename=&#034;home&#034; [L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subir Ghosh</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-554143</link>
		<dc:creator>Subir Ghosh</dc:creator>
		<pubDate>Wed, 12 Mar 2008 05:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-554143</guid>
		<description>Recently I removed some content from the main site (http://www.newswatch.in/) to a subdomain (http://oldcontent.newswatch.in/). Some content. Not all.


What I am seeking to do is something like this:

Redirect http://www.newswatch.in/news-analyses/*.* TO http://oldcontent.newswatch.in/news-analyses/*


For this I tried using:

Redirect /news-analyses http://oldcontent.newswatch.in/news-analyses/

This is not working because the server is creating a loop for http://oldcontent.newswatch.in/news-analyses/ as well.

How should this be changed?</description>
		<content:encoded><![CDATA[<p>Recently I removed some content from the main site (http://www.newswatch.in/) to a subdomain (http://oldcontent.newswatch.in/). Some content. Not all.</p>
<p>What I am seeking to do is something like this:</p>
<p>Redirect <a href="http://www.newswatch.in/news-analyses/" rel="nofollow">http://www.newswatch.in/news-analyses/</a>*.* TO <a href="http://oldcontent.newswatch.in/news-analyses/" rel="nofollow">http://oldcontent.newswatch.in/news-analyses/</a>*</p>
<p>For this I tried using:</p>
<p>Redirect /news-analyses <a href="http://oldcontent.newswatch.in/news-analyses/" rel="nofollow">http://oldcontent.newswatch.in/news-analyses/</a></p>
<p>This is not working because the server is creating a loop for <a href="http://oldcontent.newswatch.in/news-analyses/" rel="nofollow">http://oldcontent.newswatch.in/news-analyses/</a> as well.</p>
<p>How should this be changed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-539346</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 07 Dec 2007 20:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-539346</guid>
		<description>Also I found something that didn't work on this:
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.MYDOMAIN\.com.*$
RewriteRule (.*) http://MYDOMAIN.com/blog/$1 [L]

I had to add parenthesis around (www\.)?[^.]+ to make it work so now it looks like this 
RewriteCond %{HTTP_HOST} ^((www\.)?[^.]+)\.MYDOMAIN\.com.*$

AND I had to use a % insead of a $ at the end of the RewriteRule so it now looks like this
RewriteRule (.*) http://MYDOMAIN.com/blog/%1 [L]

Now it works except for when i go to http://www.MYDOMAIN.com i need it to go to http://www.MYDOMAIN.com/index.php and it isn't doing that with this code.</description>
		<content:encoded><![CDATA[<p>Also I found something that didn&#039;t work on this:<br />
RewriteEngine on<br />
RewriteBase /</p>
<p>RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.MYDOMAIN\.com.*$<br />
RewriteRule (.*) <a href="http://MYDOMAIN.com/blog/1" rel="nofollow">http://MYDOMAIN.com/blog/1</a> [L]</p>
<p>I had to add parenthesis around (www\.)?[^.]+ to make it work so now it looks like this<br />
RewriteCond %{HTTP_HOST} ^((www\.)?[^.]+)\.MYDOMAIN\.com.*$</p>
<p>AND I had to use a % insead of a $ at the end of the RewriteRule so it now looks like this<br />
RewriteRule (.*) <a href="http://MYDOMAIN.com/blog/%1" rel="nofollow">http://MYDOMAIN.com/blog/%1</a> [L]</p>
<p>Now it works except for when i go to <a href="http://www.MYDOMAIN.com" rel="nofollow">http://www.MYDOMAIN.com</a> i need it to go to <a href="http://www.MYDOMAIN.com/index.php" rel="nofollow">http://www.MYDOMAIN.com/index.php</a> and it isn&#039;t doing that with this code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-539343</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 07 Dec 2007 20:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-539343</guid>
		<description>This works great except for one thing. When someone goes to http://www.mysite.com/ it does this http://mysite.com/www

How do you fix this one?</description>
		<content:encoded><![CDATA[<p>This works great except for one thing. When someone goes to <a href="http://www.mysite.com/" rel="nofollow">http://www.mysite.com/</a> it does this <a href="http://mysite.com/www" rel="nofollow">http://mysite.com/www</a></p>
<p>How do you fix this one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-528359</link>
		<dc:creator>Oleg</dc:creator>
		<pubDate>Wed, 05 Sep 2007 21:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-528359</guid>
		<description>I'm in the same boat as you :D

.htaccess and PHP regex I just don't get. Whenever I need to use it for something, I google it.</description>
		<content:encoded><![CDATA[<p>I&#039;m in the same boat as you <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>.htaccess and PHP regex I just don&#039;t get. Whenever I need to use it for something, I google it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aequalsb</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-524894</link>
		<dc:creator>aequalsb</dc:creator>
		<pubDate>Wed, 08 Aug 2007 22:02:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-524894</guid>
		<description>@lucas
that IS a good website and their RegEx Buddy is a great regular expression learning/honing/testing software

@olmansju
i can see that your goal is to use the same file over and over for similar websites.  unfortunately, i have been unable to find documentation or solution for capturing the current host to use it to rewrite URLs. however, i have been able to use this htaccess file for any hosting client of mine because it doesn't rely on the hostname at all:
the example is using the short and tidy /stats to redirect to a client's webstats page at /plesk-stat/webstat
====================
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_URI} /stats/?$ [NC]
RewriteRule . /plesk-stat/webstat/ [L]
====================
it works, without alteration, for any client on my server</description>
		<content:encoded><![CDATA[<p>@lucas<br />
that IS a good website and their RegEx Buddy is a great regular expression learning/honing/testing software</p>
<p>@olmansju<br />
i can see that your goal is to use the same file over and over for similar websites.  unfortunately, i have been unable to find documentation or solution for capturing the current host to use it to rewrite URLs. however, i have been able to use this htaccess file for any hosting client of mine because it doesn&#039;t rely on the hostname at all:<br />
the example is using the short and tidy /stats to redirect to a client&#039;s webstats page at /plesk-stat/webstat<br />
====================<br />
RewriteEngine on<br />
RewriteBase /</p>
<p>RewriteCond %{REQUEST_URI} /stats/?$ [NC]<br />
RewriteRule . /plesk-stat/webstat/ [L]<br />
====================<br />
it works, without alteration, for any client on my server</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aequalsb</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-524833</link>
		<dc:creator>aequalsb</dc:creator>
		<pubDate>Wed, 08 Aug 2007 03:13:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-524833</guid>
		<description>i concocted this htaccess file that will get the job done

==========================
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.MYDOMAIN\.com.*$
RewriteRule (.*) http://MYDOMAIN.com/blog/$1 [L]

==========================
i am very capable with regular expression because i simply hammered away at any given expression when the need arose. it was not easy -- but i just kept on. try starting with little ones for practice and work your way up.

now... htaccess files are still tough for me.  i wrote my first one about a month ago. they are hard to fathom, and without knowing regular expressions, it's even harder.

let's break down the htaccess file above:
--------------------
LINE 1: generic stuff... skipping
--------------------
LINE 2: generic stuff... skipping
--------------------
LINE 3: a rewrite cond :: in plain english -&#62; take the dynamically provided HTTP_HOST and try to match it to the regular expression that follows it:

	^ = start matching from the beginning of the string (aka: the "left edge" of the string)

	(www\.)? = optionally match the literal string "www."
		"?" makes it optional and the parentheses tells the "?" to refer to the entire string "www." (note the \ before the dot -- it says to treat the "." as a literal dot instead of a wildcard) (and you don't need 2 lines of conditions as this expression will handle with and without "www.")

	[^.]+\. = try to match ANYTHING that is NOT a dot 1 or more times then match a literal dot
		the brackets "[ ]" allow us to specify a class or range of characters, the "^" INSIDE the brackets says to NOT match the range, the "+" says "1 or more times" (so it must match AT LEAST one and optionally any number afterwards)(note: when a "." is inside brackets it is automatically treated as a literal dot instead of a wildcard), then our literal dot "\."

	MYDOMAIN\.com = match the literal string "MYDOMAIN\.com" where MYDOMAIN name = your actual domain name (don't forget to escape the "\.")

	.* = match ANYTHING "zero or more times"
		such as a trailing slash "/" -- or query such as "?var=val" -- or anchor such as "#anchor" -- or anything that trails the domain part.   the "." tells it to be "anything" and the "*" tells it to be "zero or more times"

	$ = match to the end of the string
		technically not needed as the wildcard "." will match anything until it runs out of string -- but i think it's tidy
--------------------
LINE 4: a rewrite rule :: rewrite the current URL, where the regular expression matches it, to the new URL that follows it
	
	(.*) = match anything "zero or more times" and capture it (using "( )" -- it will be used in backreference $1)
		this part baffles me because i do not understand how it matches the part we need to remember. that is, the part trailing the domain name (if there is a trailing part) -- my experience says it should match and capture the entire URL -- but it works... (i do have an inkling that using the RewriteBase / is what makes it work)
		you do NOT need a "^" nor "$" because the wildcard "." with "*" matches everything
 
	http://MYDOMAIN.com/blog/ = build the literal part of the URL (and, of course, "blog/" could be replaced with any filepath you wanted)

	$1 = append anything that may have been captured following the domain name from the original URL

	[L] = LAST = tell htaccess NOT to perform any more conditional checks nor rewrite rules -- it is also technically NOT needed in an htaccess files where you have one or more conditions that trigger only ONE rewrite rule... as it will be the first and only rewrite rule performed

that's it...</description>
		<content:encoded><![CDATA[<p>i concocted this htaccess file that will get the job done</p>
<p>==========================<br />
RewriteEngine on<br />
RewriteBase /</p>
<p>RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.MYDOMAIN\.com.*$<br />
RewriteRule (.*) <a href="http://MYDOMAIN.com/blog/1" rel="nofollow">http://MYDOMAIN.com/blog/1</a> [L]</p>
<p>==========================<br />
i am very capable with regular expression because i simply hammered away at any given expression when the need arose. it was not easy &#8212; but i just kept on. try starting with little ones for practice and work your way up.</p>
<p>now&#8230; htaccess files are still tough for me.  i wrote my first one about a month ago. they are hard to fathom, and without knowing regular expressions, it&#039;s even harder.</p>
<p>let&#039;s break down the htaccess file above:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
LINE 1: generic stuff&#8230; skipping<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
LINE 2: generic stuff&#8230; skipping<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
LINE 3: a rewrite cond :: in plain english -&gt; take the dynamically provided HTTP_HOST and try to match it to the regular expression that follows it:</p>
<p>	^ = start matching from the beginning of the string (aka: the &#034;left edge&#034; of the string)</p>
<p>	(www\.)? = optionally match the literal string &#034;www.&#034;<br />
		&#034;?&#034; makes it optional and the parentheses tells the &#034;?&#034; to refer to the entire string &#034;www.&#034; (note the \ before the dot &#8212; it says to treat the &#034;.&#034; as a literal dot instead of a wildcard) (and you don&#039;t need 2 lines of conditions as this expression will handle with and without &#034;www.&#034;)</p>
<p>	[^.]+\. = try to match ANYTHING that is NOT a dot 1 or more times then match a literal dot<br />
		the brackets &#034;[ ]&#034; allow us to specify a class or range of characters, the &#034;^&#034; INSIDE the brackets says to NOT match the range, the &#034;+&#034; says &#034;1 or more times&#034; (so it must match AT LEAST one and optionally any number afterwards)(note: when a &#034;.&#034; is inside brackets it is automatically treated as a literal dot instead of a wildcard), then our literal dot &#034;\.&#034;</p>
<p>	MYDOMAIN\.com = match the literal string &#034;MYDOMAIN\.com&#034; where MYDOMAIN name = your actual domain name (don&#039;t forget to escape the &#034;\.&#034;)</p>
<p>	.* = match ANYTHING &#034;zero or more times&#034;<br />
		such as a trailing slash &#034;/&#034; &#8212; or query such as &#034;?var=val&#034; &#8212; or anchor such as &#034;#anchor&#034; &#8212; or anything that trails the domain part.   the &#034;.&#034; tells it to be &#034;anything&#034; and the &#034;*&#034; tells it to be &#034;zero or more times&#034;</p>
<p>	$ = match to the end of the string<br />
		technically not needed as the wildcard &#034;.&#034; will match anything until it runs out of string &#8212; but i think it&#039;s tidy<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
LINE 4: a rewrite rule :: rewrite the current URL, where the regular expression matches it, to the new URL that follows it</p>
<p>	(.*) = match anything &#034;zero or more times&#034; and capture it (using &#034;( )&#034; &#8212; it will be used in backreference $1)<br />
		this part baffles me because i do not understand how it matches the part we need to remember. that is, the part trailing the domain name (if there is a trailing part) &#8212; my experience says it should match and capture the entire URL &#8212; but it works&#8230; (i do have an inkling that using the RewriteBase / is what makes it work)<br />
		you do NOT need a &#034;^&#034; nor &#034;$&#034; because the wildcard &#034;.&#034; with &#034;*&#034; matches everything</p>
<p>	<a href="http://MYDOMAIN.com/blog/" rel="nofollow">http://MYDOMAIN.com/blog/</a> = build the literal part of the URL (and, of course, &#034;blog/&#034; could be replaced with any filepath you wanted)</p>
<p>	$1 = append anything that may have been captured following the domain name from the original URL</p>
<p>	[L] = LAST = tell htaccess NOT to perform any more conditional checks nor rewrite rules &#8212; it is also technically NOT needed in an htaccess files where you have one or more conditions that trigger only ONE rewrite rule&#8230; as it will be the first and only rewrite rule performed</p>
<p>that&#039;s it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olmansju</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-524618</link>
		<dc:creator>olmansju</dc:creator>
		<pubDate>Sun, 05 Aug 2007 23:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-524618</guid>
		<description>so how would you use reg expressions to automate it for multiple sites?

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(whatIShere).mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.(whatIShere).mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/(whatIShere)/$1 [R=301,L]

?  i tried but could not get it

RewriteCond %{HTTP_HOST} ^([A-Za-z0-9]+).mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.([A-Za-z0-9]+).mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/([A-Za-z0-9]+)/$1 [R=301,L]</description>
		<content:encoded><![CDATA[<p>so how would you use reg expressions to automate it for multiple sites?</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^(whatIShere).mysite.com$ [OR]<br />
RewriteCond %{HTTP_HOST} ^www.(whatIShere).mysite.com$<br />
RewriteRule ^(.*)$ <a href="http://www.mysite.com/" rel="nofollow">http://www.mysite.com/</a>(whatIShere)/$1 [R=301,L]</p>
<p>?  i tried but could not get it</p>
<p>RewriteCond %{HTTP_HOST} ^([A-Za-z0-9]+).mysite.com$ [OR]<br />
RewriteCond %{HTTP_HOST} ^www.([A-Za-z0-9]+).mysite.com$<br />
RewriteRule ^(.*)$ <a href="http://www.mysite.com/" rel="nofollow">http://www.mysite.com/</a>([A-Za-z0-9]+)/$1 [R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bubazoo</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-520854</link>
		<dc:creator>bubazoo</dc:creator>
		<pubDate>Thu, 05 Jul 2007 00:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-520854</guid>
		<description>shoulda asked me, I've been using this bit of code for several years..

RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog.mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.blog.mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/blog/$1 [R=301,L]

This performs a 301 Redirect on the subdomain. You have to check for www.blog or blog, because some browsers automatically put in the www at the beginning of each address.</description>
		<content:encoded><![CDATA[<p>shoulda asked me, I&#039;ve been using this bit of code for several years..</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^blog.mysite.com$ [OR]<br />
RewriteCond %{HTTP_HOST} ^www.blog.mysite.com$<br />
RewriteRule ^(.*)$ <a href="http://www.mysite.com/blog/1" rel="nofollow">http://www.mysite.com/blog/1</a> [R=301,L]</p>
<p>This performs a 301 Redirect on the subdomain. You have to check for <a href="http://www.blog" rel="nofollow">http://www.blog</a> or blog, because some browsers automatically put in the www at the beginning of each address.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.358 seconds -->
