<?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: 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>
	<lastBuildDate>Tue, 10 Jan 2012 01:21:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: hardik</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/comment-page-1/#comment-659485</link>
		<dc:creator>hardik</dc:creator>
		<pubDate>Wed, 16 Feb 2011 18:34:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-659485</guid>
		<description>I need same like this 

anyone help me

my domain is:

http://www.example.com

but i want this.

http://www.yessica.example.com -&gt; http://www.example.com/usuario.php=yessica

helpme please.</description>
		<content:encoded><![CDATA[<p>I need same like this </p>
<p>anyone help me</p>
<p>my domain is:</p>
<p><a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
<p>but i want this.</p>
<p><a href="http://www.yessica.example.com" rel="nofollow">http://www.yessica.example.com</a> -&gt; <a href="http://www.example.com/usuario.php=yessica" rel="nofollow">http://www.example.com/usuario.php=yessica</a></p>
<p>helpme please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: natacha</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/comment-page-1/#comment-656038</link>
		<dc:creator>natacha</dc:creator>
		<pubDate>Wed, 05 Jan 2011 08:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-656038</guid>
		<description>I want this please:

my domain is:

http://www.example.com

my subdomain is:

service.example.com

i want this

http://www.service.example.com -&gt; http://www.example.com</description>
		<content:encoded><![CDATA[<p>I want this please:</p>
<p>my domain is:</p>
<p><a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
<p>my subdomain is:</p>
<p>service.example.com</p>
<p>i want this</p>
<p><a href="http://www.service.example.com" rel="nofollow">http://www.service.example.com</a> -&gt; <a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jerey</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/comment-page-1/#comment-645175</link>
		<dc:creator>jerey</dc:creator>
		<pubDate>Thu, 11 Mar 2010 09:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-645175</guid>
		<description>how do i rewrite this because it tried

RewriteEngine on
#Options +FollowSymlinks

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
RewriteBase /careers/admin
ErrorDocument 404 /page-unavailable/





i want to access

http://careers.mydomain.com/admin</description>
		<content:encoded><![CDATA[<p>how do i rewrite this because it tried</p>
<p>RewriteEngine on<br />
#Options +FollowSymlinks</p>
<p>RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . index.php [L]<br />
RewriteBase /careers/admin<br />
ErrorDocument 404 /page-unavailable/</p>
<p>i want to access</p>
<p><a href="http://careers.mydomain.com/admin" rel="nofollow">http://careers.mydomain.com/admin</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: epool86</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/comment-page-1/#comment-644042</link>
		<dc:creator>epool86</dc:creator>
		<pubDate>Tue, 02 Feb 2010 07:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-644042</guid>
		<description>what i want is, either &quot;blog.domain.com&quot; or &quot;www.blog.domain.com&quot; to be rewrited (not redirected) to &quot;/blog&quot; directory.

so far, this is my htaccess

RewriteCond %{HTTP_HOST} ^(www\.)?(blog)\.domain\.com$
RewriteRule ^(.*)$ %2/ [NC,L]

and its work fine (i already set wildcard subdomain on my hosting). 

but the problem is i want URL &quot;blog.domain.com/anythingHere&quot; to be rewrited to &quot;/blog/anythingHere&quot; directory 

i dont know how to do it. i tried the following script but it resulting an 500 internal server error

RewriteCond %{HTTP_HOST} ^(www\.)?(blog)\.domain\.com$
RewriteRule ^(.*)$ %2/$1 [NC,L]

can someone help me please? after 2 days i still haven&#039;t found the solution yet :-(</description>
		<content:encoded><![CDATA[<p>what i want is, either &#034;blog.domain.com&#034; or &#034;www.blog.domain.com&#034; to be rewrited (not redirected) to &#034;/blog&#034; directory.</p>
<p>so far, this is my htaccess</p>
<p>RewriteCond %{HTTP_HOST} ^(www\.)?(blog)\.domain\.com$<br />
RewriteRule ^(.*)$ %2/ [NC,L]</p>
<p>and its work fine (i already set wildcard subdomain on my hosting). </p>
<p>but the problem is i want URL &#034;blog.domain.com/anythingHere&#034; to be rewrited to &#034;/blog/anythingHere&#034; directory </p>
<p>i dont know how to do it. i tried the following script but it resulting an 500 internal server error</p>
<p>RewriteCond %{HTTP_HOST} ^(www\.)?(blog)\.domain\.com$<br />
RewriteRule ^(.*)$ %2/$1 [NC,L]</p>
<p>can someone help me please? after 2 days i still haven&#039;t found the solution yet <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/comment-page-1/#comment-643524</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sat, 16 Jan 2010 17:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-643524</guid>
		<description>I have an idea for anyone who is looking to have &#039;subdomain.domain.com&#039; redirect to &#039;domain.com/subdomain&#039; BUT still have &#039;subdomain.domain.com&#039; remain in the URL. I didn&#039;t use htaccess. I used PHP instead.

1. Add a wildcard DNS setting to your domain. (*.domain.com) I did this using my plesk control panel. Simply add a new DNS record with *.domain.com and the domain&#039;s IP.

2. In the root of domain.com, put an index.php file that parses the url and extracts the subdomain. I simply used:
$url = explode(&#039;.&#039;, $_SERVER[&#039;HTTP_HOST&#039;]);
$subdomain = $url[0];

... which isn&#039;t the best but fine for now.

Once I extracted the subdomain, I simply did:

require_once $subdomain.&#039;/index.php&#039;;



It works well. Does anyone see any problems with this?</description>
		<content:encoded><![CDATA[<p>I have an idea for anyone who is looking to have &#039;subdomain.domain.com&#039; redirect to &#039;domain.com/subdomain&#039; BUT still have &#039;subdomain.domain.com&#039; remain in the URL. I didn&#039;t use htaccess. I used PHP instead.</p>
<p>1. Add a wildcard DNS setting to your domain. (*.domain.com) I did this using my plesk control panel. Simply add a new DNS record with *.domain.com and the domain&#039;s IP.</p>
<p>2. In the root of domain.com, put an index.php file that parses the url and extracts the subdomain. I simply used:<br />
$url = explode(&#039;.&#039;, $_SERVER['HTTP_HOST']);<br />
$subdomain = $url[0];</p>
<p>&#8230; which isn&#039;t the best but fine for now.</p>
<p>Once I extracted the subdomain, I simply did:</p>
<p>require_once $subdomain.&#039;/index.php&#039;;</p>
<p>It works well. Does anyone see any problems with this?</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-page-1/#comment-643231</link>
		<dc:creator>aequalsb</dc:creator>
		<pubDate>Tue, 05 Jan 2010 16:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-643231</guid>
		<description>the PHP code was zapped in the above post.

put this code in your index.php file between the &quot;PHP tags&quot;:
-----
header( &#039;http://artsedg.com&#039; );
exit;
-----</description>
		<content:encoded><![CDATA[<p>the PHP code was zapped in the above post.</p>
<p>put this code in your index.php file between the &#034;PHP tags&#034;:<br />
&#8212;&#8211;<br />
header( &#039;<a href="http://artsedg.com" rel="nofollow">http://artsedg.com</a>&#039; );<br />
exit;<br />
&#8212;&#8211;</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-page-1/#comment-643230</link>
		<dc:creator>aequalsb</dc:creator>
		<pubDate>Tue, 05 Jan 2010 16:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-643230</guid>
		<description>the PHP code was zapped in the above post.

here it is again:
&lt;?php

header( &#039;http://artsedg.com&#039; );
exit;

?&gt;</description>
		<content:encoded><![CDATA[<p>the PHP code was zapped in the above post.</p>
<p>here it is again:<br />
&lt;?php</p>
<p>header( &#039;<a href="http://artsedg.com" rel="nofollow">http://artsedg.com</a>&#039; );<br />
exit;</p>
<p>?&gt;</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-page-1/#comment-643229</link>
		<dc:creator>aequalsb</dc:creator>
		<pubDate>Tue, 05 Jan 2010 16:30:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-643229</guid>
		<description>you will not be able to do what you want unless you have FTP access at weebly (to be able to create the .htaccess file there) AND weebly will honor localized .htaccess files.

you can, however, do a PHP redirect (unless you have NO FTP access). you would need something like this in the index.php file.



there may be additional workarounds using whatever CMS is provided by weebly (i have no idea). the thing you&#039;re looking for is he ability to upload or create a .htaccess file or an index.php file AT weebly.</description>
		<content:encoded><![CDATA[<p>you will not be able to do what you want unless you have FTP access at weebly (to be able to create the .htaccess file there) AND weebly will honor localized .htaccess files.</p>
<p>you can, however, do a PHP redirect (unless you have NO FTP access). you would need something like this in the index.php file.</p>
<p>there may be additional workarounds using whatever CMS is provided by weebly (i have no idea). the thing you&#039;re looking for is he ability to upload or create a .htaccess file or an index.php file AT weebly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/comment-page-1/#comment-643185</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Mon, 04 Jan 2010 15:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-643185</guid>
		<description>@udham - normally I&#039;d suggest doing some sort of redirect - but I don&#039;t think weebly lets you have that kind of control.</description>
		<content:encoded><![CDATA[<p>@udham &#8211; normally I&#039;d suggest doing some sort of redirect &#8211; but I don&#039;t think weebly lets you have that kind of control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: udham</title>
		<link>http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/comment-page-1/#comment-643147</link>
		<dc:creator>udham</dc:creator>
		<pubDate>Sun, 03 Jan 2010 13:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/#comment-643147</guid>
		<description>want to move from http;//artsedg.weebly.com

to my own unregistered site http://artsedg.com  by 

redirection, any help . THANQS in advance</description>
		<content:encoded><![CDATA[<p>want to move from http;//artsedg.weebly.com</p>
<p>to my own unregistered site <a href="http://artsedg.com" rel="nofollow">http://artsedg.com</a>  by </p>
<p>redirection, any help . THANQS in advance</p>
]]></content:encoded>
	</item>
</channel>
</rss>

