<?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: Apache Rewrite Cheatsheet</title>
	<atom:link href="http://borkweb.com/story/apache-rewrite-cheatsheet/feed" rel="self" type="application/rss+xml" />
	<link>http://borkweb.com/story/apache-rewrite-cheatsheet</link>
	<description>Some People Are Squirrel Handed.</description>
	<lastBuildDate>Thu, 12 Jan 2012 15:56:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Quick Tip: .htaccess mod_rewrite rule &#124; r.osey.me</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-44934</link>
		<dc:creator>Quick Tip: .htaccess mod_rewrite rule &#124; r.osey.me</dc:creator>
		<pubDate>Thu, 08 Dec 2011 15:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-44934</guid>
		<description>[...] borkweb.com&#8217;s Apache rewrite cheat sheet [...]</description>
		<content:encoded><![CDATA[<p>[...] borkweb.com&#8217;s Apache rewrite cheat sheet [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Luff</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-44820</link>
		<dc:creator>Simon Luff</dc:creator>
		<pubDate>Fri, 20 May 2011 08:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-44820</guid>
		<description>Hi folks,

# Site has permanently moved to new domain
# domain.com to domain2.com
RewriteCond   %{HTTP_HOST}   ^www.domain.com$   [NC]
RewriteRule   ^(.*)$   http://www.domain2.com/$1   [R=301,L]

I&#039;ve seen the same form a few times in this post and elsewhere, it&#039;s not quite right. You need an extra forward slash in the match or you&#039;ll add an extra one whenever you redirect someone.

RewriteRule   ^/(.*)$   http://www.domain2.com/$1   [R=301,L]</description>
		<content:encoded><![CDATA[<p>Hi folks,</p>
<p># Site has permanently moved to new domain<br />
# domain.com to domain2.com<br />
RewriteCond   %{HTTP_HOST}   ^www.domain.com$   [NC]<br />
RewriteRule   ^(.*)$   <a href="http://www.domain2.com/$1" rel="nofollow">http://www.domain2.com/$1</a>   [R=301,L]</p>
<p>I&#8217;ve seen the same form a few times in this post and elsewhere, it&#8217;s not quite right. You need an extra forward slash in the match or you&#8217;ll add an extra one whenever you redirect someone.</p>
<p>RewriteRule   ^/(.*)$   <a href="http://www.domain2.com/$1" rel="nofollow">http://www.domain2.com/$1</a>   [R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jai</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-43807</link>
		<dc:creator>Jai</dc:creator>
		<pubDate>Mon, 14 Jun 2010 11:27:10 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-43807</guid>
		<description>Hi,

Nice info. Have a look into this too : 
http://innovationframes.com/phpbb/viewtopic.php?f=14&amp;t=43&amp;p=33&amp;hilit=apache+redirect#p33</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Nice info. Have a look into this too :<br />
<a href="http://innovationframes.com/phpbb/viewtopic.php?f=14&#038;t=43&#038;p=33&#038;hilit=apache+redirect#p33" rel="nofollow">http://innovationframes.com/phpbb/viewtopic.php?f=14&#038;t=43&#038;p=33&#038;hilit=apache+redirect#p33</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Masinter</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-43554</link>
		<dc:creator>John Masinter</dc:creator>
		<pubDate>Sun, 21 Mar 2010 17:05:46 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-43554</guid>
		<description>The below was a scenario not covered above. 
I had trouble at first getting multiple RewriteCond to map to one rule.
The trick is each Rewrite conditions has an or [OR] flag, EXCEPT for the very last one.
This works for me:

# map all my domain variations of smithkey (com,org,net,info) to www.smithkey.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^smithkey.com [NC,OR]
RewriteCond %{HTTP_HOST} ^smithkey.org [NC,OR]
RewriteCond %{HTTP_HOST} ^smithkey.net [NC,OR]
RewriteCond %{HTTP_HOST} ^smithkey.info [NC,OR]
RewriteCond %{HTTP_HOST} ^www.smithkey.org [NC,OR]
RewriteCond %{HTTP_HOST} ^www.smithkey.net [NC,OR]
RewriteCond %{HTTP_HOST} ^www.smithkey.info [NC]
RewriteRule ^(.*)$       http://www.smithkey.com/$1 [R=permanent,L]</description>
		<content:encoded><![CDATA[<p>The below was a scenario not covered above.<br />
I had trouble at first getting multiple RewriteCond to map to one rule.<br />
The trick is each Rewrite conditions has an or [OR] flag, EXCEPT for the very last one.<br />
This works for me:</p>
<p># map all my domain variations of smithkey (com,org,net,info) to <a href="http://www.smithkey.com" rel="nofollow">http://www.smithkey.com</a><br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^smithkey.com [NC,OR]<br />
RewriteCond %{HTTP_HOST} ^smithkey.org [NC,OR]<br />
RewriteCond %{HTTP_HOST} ^smithkey.net [NC,OR]<br />
RewriteCond %{HTTP_HOST} ^smithkey.info [NC,OR]<br />
RewriteCond %{HTTP_HOST} ^www.smithkey.org [NC,OR]<br />
RewriteCond %{HTTP_HOST} ^www.smithkey.net [NC,OR]<br />
RewriteCond %{HTTP_HOST} ^www.smithkey.info [NC]<br />
RewriteRule ^(.*)$       <a href="http://www.smithkey.com/$1" rel="nofollow">http://www.smithkey.com/$1</a> [R=permanent,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ferri</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-43431</link>
		<dc:creator>Ferri</dc:creator>
		<pubDate>Sat, 27 Feb 2010 14:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-43431</guid>
		<description>its great protect spammer</description>
		<content:encoded><![CDATA[<p>its great protect spammer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anandm</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-43335</link>
		<dc:creator>anandm</dc:creator>
		<pubDate>Fri, 05 Feb 2010 05:59:13 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-43335</guid>
		<description>I have a scenario where I have 2 apache web servers running – Apache#1 is listening on port 80 and Apache#2 at port, say, 9000.
Our product is using the Apache#2 that runs at port 9000.
For a certain applet implementation, we are using RMIHttpToCGISocketFactory that is used for making RMI request thru HTTP tunnel.
This is forcing the request to the url “/cgi-bin/java-rmi.cgi” via port 80.
The other apache running at port 80 has no idea what to do with this url. So I have to write a RewriteRule in httpd.conf of Apache#1 to redirect the above url as POST request to Apache#2.
Can you tell me how to write a rewrite rule for POST request in Apache. I tried googling but all links I got talks only abt rewriting GET requests.
The other thing is that the url “/cgi-bin/java-rmi.cgi” will only accept POST requests. If I try to query this url in the browser, I see an error that says that GET requests are NOT allowed on this url.

If you have any info on how to do POST request redirection, please let me know.

Thanks</description>
		<content:encoded><![CDATA[<p>I have a scenario where I have 2 apache web servers running – Apache#1 is listening on port 80 and Apache#2 at port, say, 9000.<br />
Our product is using the Apache#2 that runs at port 9000.<br />
For a certain applet implementation, we are using RMIHttpToCGISocketFactory that is used for making RMI request thru HTTP tunnel.<br />
This is forcing the request to the url “/cgi-bin/java-rmi.cgi” via port 80.<br />
The other apache running at port 80 has no idea what to do with this url. So I have to write a RewriteRule in httpd.conf of Apache#1 to redirect the above url as POST request to Apache#2.<br />
Can you tell me how to write a rewrite rule for POST request in Apache. I tried googling but all links I got talks only abt rewriting GET requests.<br />
The other thing is that the url “/cgi-bin/java-rmi.cgi” will only accept POST requests. If I try to query this url in the browser, I see an error that says that GET requests are NOT allowed on this url.</p>
<p>If you have any info on how to do POST request redirection, please let me know.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cool Finds in My Bookmarks &#124; Musings From the Throne</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-43213</link>
		<dc:creator>Cool Finds in My Bookmarks &#124; Musings From the Throne</dc:creator>
		<pubDate>Sat, 02 Jan 2010 19:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-43213</guid>
		<description>[...] Apache Rewrite Cheatsheet [...]</description>
		<content:encoded><![CDATA[<p>[...] Apache Rewrite Cheatsheet [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-42863</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Fri, 16 Oct 2009 01:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-42863</guid>
		<description>The pagination works for me. But i don&#039;t know if i can pass any other query strings of the clean URL to the real scrip file.</description>
		<content:encoded><![CDATA[<p>The pagination works for me. But i don&#8217;t know if i can pass any other query strings of the clean URL to the real scrip file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-42557</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sun, 30 Aug 2009 10:18:47 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-42557</guid>
		<description>Please note the link to ilovejackdaniels has moved to addedbytes.com</description>
		<content:encoded><![CDATA[<p>Please note the link to ilovejackdaniels has moved to addedbytes.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Create SEO Friendly URLs</title>
		<link>http://borkweb.com/story/apache-rewrite-cheatsheet/comment-page-1#comment-42509</link>
		<dc:creator>Create SEO Friendly URLs</dc:creator>
		<pubDate>Sun, 23 Aug 2009 22:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://borkweb.com/story/apache-rewrite-cheatsheet#comment-42509</guid>
		<description>[...] For More Apache Mod_Rewrite rules, check out the Apache Rewrite Cheatsheet. [...]</description>
		<content:encoded><![CDATA[<p>[...] For More Apache Mod_Rewrite rules, check out the Apache Rewrite Cheatsheet. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

