<?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>scriptygoddess &#187; htaccess tricks</title>
	<atom:link href="http://www.scriptygoddess.com/archives/category/htaccess-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Thu, 08 Dec 2011 18:23:44 +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>Redirect a subdomain to a directory using .htaccess</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/</link>
		<comments>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 18:23:53 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[htaccess tricks]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/</guid>
		<description><![CDATA[I will tell you right off the bat that I don&#039;t &#034;get&#034; regular expressions, and I don&#039;t get .htacess rewrite rules. I wish I understood them better, but there&#039;s some part of my brain that just fights me every time I try to get a better all-around understanding. Still, I have to (and want to) [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I will tell you right off the bat that I don&#039;t &#034;get&#034; regular expressions, and I don&#039;t get .htacess rewrite rules. I wish I understood them better, but there&#039;s some part of my brain that just fights me every time I try to get a better all-around understanding. Still, I have to (and want to) do stuff with htaccess, so I end up digging for code online, and trying stuff until something works. I wish I knew more about WHY it worked, but I&#039;m just happy that it works at all. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now that I&#039;m done with my disclaimer, on to the point of this post. I had to use a htaccess file to redirect a subdomain to a directory in the main domain. For example: http://blog.mysite.com needed to point to http://www.mysite.com/blog/</p>
<p>After much digging and trial and error, this seems to work:<code>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^blog\.mysite\.com<br />
RewriteRule ^(.*)$ /blog/$1 [L]</code></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
	</channel>
</rss>

