<?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: mod_rewrite help needed</title>
	<atom:link href="http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/</link>
	<description>Conversation. Collaboration. Community.</description>
	<pubDate>Sat, 10 Jan 2009 00:53:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Erki Esken</title>
		<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/comment-page-1/#comment-1202</link>
		<dc:creator>Erki Esken</dc:creator>
		<pubDate>Thu, 19 Oct 2006 07:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://dev.acidlabs.org/2006/10/17/mod_rewrite-help-needed/#comment-1202</guid>
		<description>What version of Apache are you using? mod_rewrite differs between 1.3, 2.0 and 2.2 a bit. Also do you have access to error log, maybe something is listed there that shows what's wrong. I ran this same rewrite rule in windows Apache 2.0 (not in .htaccess file, instead in vhost config) and it worked as expected.</description>
		<content:encoded><![CDATA[<p>What version of Apache are you using? mod_rewrite differs between 1.3, 2.0 and 2.2 a bit. Also do you have access to error log, maybe something is listed there that shows what&#8217;s wrong. I ran this same rewrite rule in windows Apache 2.0 (not in .htaccess file, instead in vhost config) and it worked as&nbsp;expected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trib</title>
		<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/comment-page-1/#comment-1201</link>
		<dc:creator>trib</dc:creator>
		<pubDate>Thu, 19 Oct 2006 04:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://dev.acidlabs.org/2006/10/17/mod_rewrite-help-needed/#comment-1201</guid>
		<description>[quote comment="9831"]Oh, if you vhost where you'll use this rewrite block serves that same www site as well, then you need another condition to exclude www domain.[/quote]@Erki - my friend, that gives me 500 errors...  Any ideas?</description>
		<content:encoded><![CDATA[<p>[quote comment=&#8221;9831&#8221;]Oh, if you vhost where you&#8217;ll use this rewrite block serves that same www site as well, then you need another condition to exclude www domain.[/quote]@Erki - my friend, that gives me 500 errors&#8230;  Any&nbsp;ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trib</title>
		<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/comment-page-1/#comment-1200</link>
		<dc:creator>trib</dc:creator>
		<pubDate>Wed, 18 Oct 2006 07:33:09 +0000</pubDate>
		<guid isPermaLink="false">http://dev.acidlabs.org/2006/10/17/mod_rewrite-help-needed/#comment-1200</guid>
		<description>[quote comment="9830"]Are you sure you want to mod_rewrite? Redirecting with a .htaccess in your subdomain would do the trick nicely:

Redirect permanent / www.acidlabs.org/trac[/quote]Nope. None of the subdomains exist physically and I?m on a shared host where I don?t get to play that game. So, I want the subdomains to end up at a physical subdirectory. Not ideal, but good enough.</description>
		<content:encoded><![CDATA[<p>[quote comment=&#8221;9830&#8221;]Are you sure you want to mod_rewrite? Redirecting with a .htaccess in your subdomain would do the trick nicely:</p>
<p>Redirect permanent / <a href="http://www.acidlabs.org/trac/quoteNope" rel="nofollow">http://www.acidlabs.org/trac/quoteNope</a>. None of the subdomains exist physically and I?m on a shared host where I don?t get to play that game. So, I want the subdomains to end up at a physical subdirectory. Not ideal, but good&nbsp;enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erki Esken</title>
		<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/comment-page-1/#comment-1199</link>
		<dc:creator>Erki Esken</dc:creator>
		<pubDate>Tue, 17 Oct 2006 13:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://dev.acidlabs.org/2006/10/17/mod_rewrite-help-needed/#comment-1199</guid>
		<description>Oh, if you vhost where you'll use this rewrite block serves that same www site as well, then you need another condition to exclude www domain.

Something like:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.] )\.example\.com$
RewriteRule ^$ http://www.example.com/%1/ [R,L]</description>
		<content:encoded><![CDATA[<p>Oh, if you vhost where you&#8217;ll use this rewrite block serves that same www site as well, then you need another condition to exclude www domain.</p>
<p>Something like:</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} !^www&#46;<br />
RewriteCond %{HTTP_HOST} ^([^.] )&#46;example&#46;com$<br />
RewriteRule ^$ <a href="http://www.example.com/%1/" rel="nofollow">http://www.example.com/%1/</a>&nbsp;[R,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan gorman</title>
		<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/comment-page-1/#comment-1198</link>
		<dc:creator>Jan gorman</dc:creator>
		<pubDate>Tue, 17 Oct 2006 13:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://dev.acidlabs.org/2006/10/17/mod_rewrite-help-needed/#comment-1198</guid>
		<description>Are you sure you want to mod_rewrite? Redirecting with a .htaccess in your subdomain would do the trick nicely:

Redirect permanent / www.acidlabs.org/trac</description>
		<content:encoded><![CDATA[<p>Are you sure you want to mod_rewrite? Redirecting with a .htaccess in your subdomain would do the trick nicely:</p>
<p>Redirect permanent /&nbsp;<a href="http://www.acidlabs.org/trac" rel="nofollow">http://www.acidlabs.org/trac</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erki Esken</title>
		<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/comment-page-1/#comment-1197</link>
		<dc:creator>Erki Esken</dc:creator>
		<pubDate>Tue, 17 Oct 2006 13:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://dev.acidlabs.org/2006/10/17/mod_rewrite-help-needed/#comment-1197</guid>
		<description>This one should do it:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^([^.] )\.example\.com$
    RewriteRule ^$ http://www.example.com/%1/ [R,L]

Just change the example.com there to your domain.

Right now it will match only requests coming to http://trac.example.com/, but not http://trac.example.com/something/else/. If you want to pass on the path too then use:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^([^.] )\.example\.com$
    RewriteRule (.*) http://www.example.com/%1/$1 [R,L]</description>
		<content:encoded><![CDATA[<p>This one should do it:</p>
<p>    RewriteEngine On<br />
    RewriteCond %{HTTP_HOST} ^([^.] )&#46;example&#46;com$<br />
    RewriteRule ^$ <a href="http://www.example.com/%1/" rel="nofollow">http://www.example.com/%1/</a> [R,L]</p>
<p>Just change the example.com there to your domain.</p>
<p>Right now it will match only requests coming to <a href="http://trac.example.com/" rel="nofollow">http://trac.example.com/</a>, but not <a href="http://trac.example.com/something/else/" rel="nofollow">http://trac.example.com/something/else/</a>. If you want to pass on the path too then use:</p>
<p>    RewriteEngine On<br />
    RewriteCond %{HTTP_HOST} ^([^.] )&#46;example&#46;com$<br />
    RewriteRule (.*) <a href="http://www.example.com/%1/$1" rel="nofollow">http://www.example.com/%1/$1</a>&nbsp;[R,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Webster</title>
		<link>http://www.acidlabs.org/2006/10/17/mod_rewrite-help-needed/comment-page-1/#comment-1196</link>
		<dc:creator>Steve Webster</dc:creator>
		<pubDate>Tue, 17 Oct 2006 13:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://dev.acidlabs.org/2006/10/17/mod_rewrite-help-needed/#comment-1196</guid>
		<description>Take a look at the following forum post. I think it has all the information you need...

http://forum.modrewrite.com/viewtopic.php?t=2149&#38;sid=a03dbb5eb05348be32042234a656210b</description>
		<content:encoded><![CDATA[<p>Take a look at the following forum post. I think it has all the information you need&#8230;&nbsp;<a href="http://forum.modrewrite.com/viewtopic.php?t=2149&amp;sid=a03dbb5eb05348be32042234a656210b" rel="nofollow">http://forum.modrewrite.com/viewtopic.php?t=2149&amp;sid=a03dbb5eb05348be32042234a656210b</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
