<?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 .htaccess query string redirects</title>
	<atom:link href="http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/</link>
	<description>Simone Carletti&#039;s personal ramblings on programming, syndication, search engines &#38; marketing.</description>
	<lastBuildDate>Thu, 09 Feb 2012 14:24:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Milap</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-40576</link>
		<dc:creator>Milap</dc:creator>
		<pubDate>Thu, 05 Jan 2012 18:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-40576</guid>
		<description>Thanks for sharing,
Working nice !!!</description>
		<content:encoded><![CDATA[<p>Thanks for sharing,<br />
Working nice !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyaw Yel</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-40525</link>
		<dc:creator>Kyaw Yel</dc:creator>
		<pubDate>Thu, 15 Dec 2011 21:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-40525</guid>
		<description>I want to redirect http://www.supplychaindigital.com/mt-search.cgi?IncludeBlogs=197,203,387,204,194,198,199,202,193,349,201,320,351,196,195&amp;tag=something to http://www.supplychaindigital.com/something</description>
		<content:encoded><![CDATA[<p>I want to redirect <a href="http://www.supplychaindigital.com/mt-search.cgi?IncludeBlogs=197,203,387,204,194,198,199,202,193,349,201,320,351,196,195&#038;tag=something" rel="nofollow">http://www.supplychaindigital.com/mt-search.cgi?IncludeBlogs=197,203,387,204,194,198,199,202,193,349,201,320,351,196,195&#038;tag=something</a> to <a href="http://www.supplychaindigital.com/something" rel="nofollow">http://www.supplychaindigital.com/something</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bijal Bhavsar</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-40442</link>
		<dc:creator>Bijal Bhavsar</dc:creator>
		<pubDate>Thu, 10 Nov 2011 05:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-40442</guid>
		<description>Hello Jel Bee,

I wants to do same as you...

http://www.domain.com/category.html?p=1&amp;limit=40 to http://www.domain.com/category.html

category.html will differ.. i can&#039;t give static &#039;category.html&#039; in RewriteRule.


RewriteCond %{QUERY_STRING} (.*)(^p=[1]&amp;?&#124;^&amp;p=[1]&amp;&#124;&amp;p=[1])$(&amp;?.*)$
RewriteRule (.*) %{REQUEST_URI}?%1%3 [L,R=301]

i used above code to redirect when &quot;p=1&quot;.</description>
		<content:encoded><![CDATA[<p>Hello Jel Bee,</p>
<p>I wants to do same as you&#8230;</p>
<p><a href="http://www.domain.com/category.html?p=1&#038;limit=40" rel="nofollow">http://www.domain.com/category.html?p=1&#038;limit=40</a> to <a href="http://www.domain.com/category.html" rel="nofollow">http://www.domain.com/category.html</a></p>
<p>category.html will differ.. i can&#8217;t give static &#8216;category.html&#8217; in RewriteRule.</p>
<p>RewriteCond %{QUERY_STRING} (.*)(^p=[1]&amp;?|^&amp;p=[1]&amp;|&amp;p=[1])$(&amp;?.*)$<br />
RewriteRule (.*) %{REQUEST_URI}?%1%3 [L,R=301]</p>
<p>i used above code to redirect when &#8220;p=1&#8243;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Merlinox</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-40437</link>
		<dc:creator>Merlinox</dc:creator>
		<pubDate>Wed, 09 Nov 2011 09:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-40437</guid>
		<description>To use more query_string parameter it needs to add on the end of {QUERY_STRING} definition the [OR] or the [AND].</description>
		<content:encoded><![CDATA[<p>To use more query_string parameter it needs to add on the end of {QUERY_STRING} definition the [OR] or the [AND].</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Caunter</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-39401</link>
		<dc:creator>Stefan Caunter</dc:creator>
		<pubDate>Thu, 06 Oct 2011 21:33:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-39401</guid>
		<description>worked.

RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^q=foo$
RewriteRule ^(.*)$ /bar/results/?  [R=302,L]

thanks.</description>
		<content:encoded><![CDATA[<p>worked.</p>
<p>RewriteCond %{REQUEST_URI} ^/$<br />
RewriteCond %{QUERY_STRING} ^q=foo$<br />
RewriteRule ^(.*)$ /bar/results/?  [R=302,L]</p>
<p>thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AZL</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-38871</link>
		<dc:creator>AZL</dc:creator>
		<pubDate>Thu, 22 Sep 2011 15:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-38871</guid>
		<description>Hi

This is great help and I think I understand it! In your mass-redirect section you suggest:

RedirectMatch ^/oldfolder/(.*)$ http://mydomain.site/newfolder/$1

Does this assume a matching new page for each of the old pages? I am trying to redirect all pages to a single page with fixed content (regardless of the extension) so would the command look like this?

RedirectMatch ^/oldfolder/(.*)$ http://mydomain.site/newpage.html (new page is a fixed content and not dynamic).

Regards


AZL</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>This is great help and I think I understand it! In your mass-redirect section you suggest:</p>
<p>RedirectMatch ^/oldfolder/(.*)$ <a href="http://mydomain.site/newfolder/$1" rel="nofollow">http://mydomain.site/newfolder/$1</a></p>
<p>Does this assume a matching new page for each of the old pages? I am trying to redirect all pages to a single page with fixed content (regardless of the extension) so would the command look like this?</p>
<p>RedirectMatch ^/oldfolder/(.*)$ <a href="http://mydomain.site/newpage.html" rel="nofollow">http://mydomain.site/newpage.html</a> (new page is a fixed content and not dynamic).</p>
<p>Regards</p>
<p>AZL</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kostya</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-38049</link>
		<dc:creator>Kostya</dc:creator>
		<pubDate>Fri, 02 Sep 2011 17:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-38049</guid>
		<description>Hello
Thank you very much for your post!
I need to close access to specific url on my site like this : &quot;index.php?act=add&quot;
So is it possibe to create some rule in .htaccess file to close access to this url or make server respond error 404 instead of 200 ok ?
I have tried to this one but it is not working:

RewriteCond %{QUERY_STRING} act=add
RewriteRule ^/index.php - [F]

If someone knows how to do this comment please.</description>
		<content:encoded><![CDATA[<p>Hello<br />
Thank you very much for your post!<br />
I need to close access to specific url on my site like this : &#8220;index.php?act=add&#8221;<br />
So is it possibe to create some rule in .htaccess file to close access to this url or make server respond error 404 instead of 200 ok ?<br />
I have tried to this one but it is not working:</p>
<p>RewriteCond %{QUERY_STRING} act=add<br />
RewriteRule ^/index.php &#8211; [F]</p>
<p>If someone knows how to do this comment please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Logan Smith</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-35367</link>
		<dc:creator>Logan Smith</dc:creator>
		<pubDate>Sat, 16 Jul 2011 10:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-35367</guid>
		<description>hi there,
i like to be able to redirect traffic coming in with specific search keywords (like those tracked with google analytics) to a specific page on another site.  Can this be done from the .htaccess file on Apache webserver?
Need Help!!</description>
		<content:encoded><![CDATA[<p>hi there,<br />
i like to be able to redirect traffic coming in with specific search keywords (like those tracked with google analytics) to a specific page on another site.  Can this be done from the .htaccess file on Apache webserver?<br />
Need Help!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JeLBee</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-33826</link>
		<dc:creator>JeLBee</dc:creator>
		<pubDate>Fri, 24 Jun 2011 12:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-33826</guid>
		<description>how to redirect this:

www.domain.com/title.html?source=2?add=2?sample=23 to
www.domain.com/title.html

need help... :)

what is the htaccess</description>
		<content:encoded><![CDATA[<p>how to redirect this:</p>
<p><a href="http://www.domain.com/title.html?source=2?add=2?sample=23" rel="nofollow">http://www.domain.com/title.html?source=2?add=2?sample=23</a> to<br />
<a href="http://www.domain.com/title.html" rel="nofollow">http://www.domain.com/title.html</a></p>
<p>need help&#8230; :)</p>
<p>what is the htaccess</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.simonecarletti.com/blog/2009/01/apache-query-string-redirects/#comment-33107</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Thu, 09 Jun 2011 14:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=87#comment-33107</guid>
		<description>Thanks for the info. Still can&#039;t quite get the right rewrite format though. I changed ecommerce engines and need to remove a query string in the middle and the end of the url

My old url: http://www.123safe.com/cgi-bin/SoftCart.exe/scstore/p-1031209AL.html

new url: http://www.123safe.com/scstore/p-1031209AL.html

some old links will have the shopping cart id attached after the .html. For example:

http://www.123safe.com/cgi-bin/SoftCart.exe/scstore/p-1031209AL.html?L+scstore+mzbz8040ff0bcd0b+1159202257

Thanks for all your help.</description>
		<content:encoded><![CDATA[<p>Thanks for the info. Still can&#8217;t quite get the right rewrite format though. I changed ecommerce engines and need to remove a query string in the middle and the end of the url</p>
<p>My old url: <a href="http://www.123safe.com/cgi-bin/SoftCart.exe/scstore/p-1031209AL.html" rel="nofollow">http://www.123safe.com/cgi-bin/SoftCart.exe/scstore/p-1031209AL.html</a></p>
<p>new url: <a href="http://www.123safe.com/scstore/p-1031209AL.html" rel="nofollow">http://www.123safe.com/scstore/p-1031209AL.html</a></p>
<p>some old links will have the shopping cart id attached after the .html. For example:</p>
<p><a href="http://www.123safe.com/cgi-bin/SoftCart.exe/scstore/p-1031209AL.html?L+scstore+mzbz8040ff0bcd0b+1159202257" rel="nofollow">http://www.123safe.com/cgi-bin/SoftCart.exe/scstore/p-1031209AL.html?L+scstore+mzbz8040ff0bcd0b+1159202257</a></p>
<p>Thanks for all your help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

