<?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: htaccess redirecting basics</title>
	<atom:link href="http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/</link>
	<description>web development, SEO, technology</description>
	<lastBuildDate>Wed, 16 Jun 2010 18:52:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: alecs</title>
		<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/comment-page-1/#comment-2970</link>
		<dc:creator>alecs</dc:creator>
		<pubDate>Mon, 09 Nov 2009 12:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.ylipsis.com/blog/?p=87#comment-2970</guid>
		<description>I don&#039;t know how to do that. But you may try a different approach:

1) Add the subdomain *. This ensures that http://whateveryoutype.example.com will show the content of http://www.example.com

2) Modify the index.php file so that the first thing it does is checking the HTTP_HOST. If it is anything else than www.example.com than loads the folder1/index.php file.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know how to do that. But you may try a different approach:</p>
<p>1) Add the subdomain *. This ensures that <a href="http://whateveryoutype.example.com" rel="nofollow">http://whateveryoutype.example.com</a> will show the content of <a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
<p>2) Modify the index.php file so that the first thing it does is checking the HTTP_HOST. If it is anything else than <a href="http://www.example.com" rel="nofollow">http://www.example.com</a> than loads the folder1/index.php file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vijay</title>
		<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/comment-page-1/#comment-2941</link>
		<dc:creator>vijay</dc:creator>
		<pubDate>Mon, 09 Nov 2009 06:07:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.ylipsis.com/blog/?p=87#comment-2941</guid>
		<description>I have One issue, please help me. My issue is I have url http://subdomain.mydomain.com and want to redirect them http://mydomin.com/folder1/index.php?user=subdomain. but I dont want to change URL in addressbar so in addressbar the url should be http://subdomain.mydomain.com. What i have to do? My .htaccess code is
=================================
#RewriteCond %{HTTP_HOST} !^www\.mydomain.com [NC]
#RewriteCond %{HTTP_HOST} ([^.]+)\.mydomain.com [NC]
#RewriteRule ^(.*)$ http://mydomain.com/folder1/index.php?user=%1 [L]
=================================
It redirect correctly, But Unfortunitly, it affect addressbar, so it&#039;s useless for me. Please help me. What I have to do? Thanks in advance.</description>
		<content:encoded><![CDATA[<p>I have One issue, please help me. My issue is I have url <a href="http://subdomain.mydomain.com" rel="nofollow">http://subdomain.mydomain.com</a> and want to redirect them <a href="http://mydomin.com/folder1/index.php?user=subdomain" rel="nofollow">http://mydomin.com/folder1/index.php?user=subdomain</a>. but I dont want to change URL in addressbar so in addressbar the url should be <a href="http://subdomain.mydomain.com" rel="nofollow">http://subdomain.mydomain.com</a>. What i have to do? My .htaccess code is<br />
=================================<br />
#RewriteCond %{HTTP_HOST} !^www\.mydomain.com [NC]<br />
#RewriteCond %{HTTP_HOST} ([^.]+)\.mydomain.com [NC]<br />
#RewriteRule ^(.*)$ <a href="http://mydomain.com/folder1/index.php?user=%1" rel="nofollow">http://mydomain.com/folder1/index.php?user=%1</a> [L]<br />
=================================<br />
It redirect correctly, But Unfortunitly, it affect addressbar, so it&#8217;s useless for me. Please help me. What I have to do? Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alecs</title>
		<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/comment-page-1/#comment-304</link>
		<dc:creator>alecs</dc:creator>
		<pubDate>Sat, 11 Oct 2008 21:56:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.ylipsis.com/blog/?p=87#comment-304</guid>
		<description>OK, I&#039;ve done some testing:
check http://test.ylipsis.com/somedirectory/anything.html?varname=varvalue
It redirects exactly as you wanted (passing the subdomain to the directory)

And here is the code in my htaccess (the one in public_html aka root directory):
&lt;code&gt;
RewriteEngine on
RewriteCond %{HTTP_HOST} ^test\.ylipsis\.com$ [NC]
RewriteRule ^(.*)$ http://www.ylipsis.com/$1 [L,R=301]&lt;/code&gt;
* there is a dollar sign on the last line - &lt;strong&gt;c o m / $ 1&lt;/strong&gt;. This seems to get parsed by wordpress...</description>
		<content:encoded><![CDATA[<p>OK, I&#8217;ve done some testing:<br />
check <a href="http://test.ylipsis.com/somedirectory/anything.html?varname=varvalue" rel="nofollow">http://test.ylipsis.com/somedirectory/anything.html?varname=varvalue</a><br />
It redirects exactly as you wanted (passing the subdomain to the directory)</p>
<p>And here is the code in my htaccess (the one in public_html aka root directory):<br />
<code><br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^test\.ylipsis\.com$ [NC]<br />
RewriteRule ^(.*)$ <a href="http://www.ylipsis.com/$1" rel="nofollow">http://www.ylipsis.com/$1</a> [L,R=301]</code><br />
* there is a dollar sign on the last line &#8211; <strong>c o m / $ 1</strong>. This seems to get parsed by wordpress&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Mos</title>
		<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/comment-page-1/#comment-303</link>
		<dc:creator>Alex Mos</dc:creator>
		<pubDate>Sat, 11 Oct 2008 15:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ylipsis.com/blog/?p=87#comment-303</guid>
		<description>when accessing an old blog post from blog.domain.com it gives an Internal Server Error 500</description>
		<content:encoded><![CDATA[<p>when accessing an old blog post from blog.domain.com it gives an Internal Server Error 500</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Mos</title>
		<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/comment-page-1/#comment-302</link>
		<dc:creator>Alex Mos</dc:creator>
		<pubDate>Sat, 11 Oct 2008 15:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.ylipsis.com/blog/?p=87#comment-302</guid>
		<description>Nope... still not working properly... it redirects to www.example.com</description>
		<content:encoded><![CDATA[<p>Nope&#8230; still not working properly&#8230; it redirects to <a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alecs</title>
		<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/comment-page-1/#comment-301</link>
		<dc:creator>alecs</dc:creator>
		<pubDate>Sat, 11 Oct 2008 15:14:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.ylipsis.com/blog/?p=87#comment-301</guid>
		<description>Try this out:
&lt;code&gt;RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog\.example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/blog/$1 [L,R=301]&lt;/code&gt;
I haven&#039;t tested it yet so let me know how it goes.
The above code should redirect blog.example.com/anything.html to www.example.com/blog/anything.html</description>
		<content:encoded><![CDATA[<p>Try this out:<br />
<code>RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^blog\.example\.com$ [NC]<br />
RewriteRule ^(.*)$ <a href="http://www.example.com/blog/$1" rel="nofollow">http://www.example.com/blog/$1</a> [L,R=301]</code><br />
I haven&#8217;t tested it yet so let me know how it goes.<br />
The above code should redirect blog.example.com/anything.html to <a href="http://www.example.com/blog/anything.html" rel="nofollow">http://www.example.com/blog/anything.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Mos</title>
		<link>http://www.ylipsis.com/blog/2008/09/htaccess-redirecting-basics/comment-page-1/#comment-300</link>
		<dc:creator>Alex Mos</dc:creator>
		<pubDate>Sat, 11 Oct 2008 14:14:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.ylipsis.com/blog/?p=87#comment-300</guid>
		<description>I am having problem redirecting blog.domain.com to www.domain.com/blog/

I used the following code...
RewriteEngine On
RewriteCond %{HTTP_HOST} ^blog\.domain\.com
RewriteRule ^(.*)$ /blog/$1 [L,R=301]

but it redirects to www.domain.com without the directory /blog/

Also tried other &quot;htaccess redirect subdomain folder&quot; examples around the web but with the same effect... none seems to be working... any ideea how to make this work?</description>
		<content:encoded><![CDATA[<p>I am having problem redirecting blog.domain.com to <a href="http://www.domain.com/blog/" rel="nofollow">http://www.domain.com/blog/</a></p>
<p>I used the following code&#8230;<br />
RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^blog\.domain\.com<br />
RewriteRule ^(.*)$ /blog/$1 [L,R=301]</p>
<p>but it redirects to <a href="http://www.domain.com" rel="nofollow">http://www.domain.com</a> without the directory /blog/</p>
<p>Also tried other &#8220;htaccess redirect subdomain folder&#8221; examples around the web but with the same effect&#8230; none seems to be working&#8230; any ideea how to make this work?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
