<?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 Examples: Cookies, Variables, Custom Headers</title>
	<atom:link href="http://www.askapache.com/htaccess/htaccess-fresh.html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com/htaccess/htaccess-fresh.html</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Tue, 18 Jun 2013 10:04:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bob</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1573</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Tue, 13 Mar 2012 14:48:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1573</guid>
		<description><![CDATA[Could you provide me an example of deleting or removing a cookie if the user requests a specific page?

For example, if the user navigates to &lt;code&gt;/user/logout&lt;/code&gt;... do you just set the expiration date/time to 0000?]]></description>
		<content:encoded><![CDATA[<p>Could you provide me an example of deleting or removing a cookie if the user requests a specific page?</p>
<p>For example, if the user navigates to <code>/user/logout</code>... do you just set the expiration date/time to 0000?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Wood</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1572</link>
		<dc:creator>Bill Wood</dc:creator>
		<pubDate>Tue, 22 Nov 2011 17:03:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1572</guid>
		<description><![CDATA[&lt;strong&gt;Can you do a short tutorial on manipulating cookie values? &lt;/strong&gt;

I have your Wordpress 404 plugin, other than some tweaks I&#039;ve made it is really great.  I have learned a TON from your site about settings in the .htaccess file and have mine massively customized for performance.  Between that and caching I&#039;m generally getting pretty good performance considering the amount of content and plugins I serve.

One thing that has plagued me for a long time is cookie size...

I am STUCK with my single domain that sets cookies for everything.  What I am looking for is some key info on how to set the cookie size to its smallest possible size for all images, .js files, etc.

Can you do a short tutorial on manipulating cookie values?  That would help a LOT!]]></description>
		<content:encoded><![CDATA[<p><strong>Can you do a short tutorial on manipulating cookie values? </strong></p>
<p>I have your Wordpress 404 plugin, other than some tweaks I've made it is really great.  I have learned a TON from your site about settings in the .htaccess file and have mine massively customized for performance.  Between that and caching I'm generally getting pretty good performance considering the amount of content and plugins I serve.</p>
<p>One thing that has plagued me for a long time is cookie size...</p>
<p>I am STUCK with my single domain that sets cookies for everything.  What I am looking for is some key info on how to set the cookie size to its smallest possible size for all images, .js files, etc.</p>
<p>Can you do a short tutorial on manipulating cookie values?  That would help a LOT!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1571</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Fri, 07 Oct 2011 17:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1571</guid>
		<description><![CDATA[&lt;strong&gt;@Matatat&lt;/strong&gt;
This is one I myself use, pay attention to the beginning and ending wildcards in the rewritecond for HTTP_COOKIE.

&lt;pre&gt;RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*) HTTP/ [NC]
RewriteCond %{HTTP_COOKIE} !^.*cookiename=thecookievaluegoeshere.*$ [NC]
RewriteRule . https://www.askapache.com/wp-login.php?redirect_to=%1 [R=302,L]&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p><strong>@Matatat</strong><br />
This is one I myself use, pay attention to the beginning and ending wildcards in the rewritecond for HTTP_COOKIE.</p>
<pre>RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*) HTTP/ [NC]
RewriteCond %{HTTP_COOKIE} !^.*cookiename=thecookievaluegoeshere.*$ [NC]
RewriteRule . https://www.askapache.com/wp-login.php?redirect_to=%1 [R=302,L]</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matatat</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1570</link>
		<dc:creator>Matatat</dc:creator>
		<pubDate>Thu, 04 Aug 2011 14:50:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1570</guid>
		<description><![CDATA[Good article here - I have a tricky one that I cannot find the answer to so posting here to see if anyone can help.

I need to create a rewrite condition to detect if a cookie is there. If the cookie is there and the value is not XX then the rewrute rule should apply.

I have got the existance check for the cookie which works but when I add the conditional check for if it is there and value is XX the condition fails :(

Any ideas - the first one works but with the introduction of the second both fail? The scenario will be that some users may have the cookie and some may not. For those that have if the value is set to XX i want to rewrite.

My rule is as below:

&lt;pre&gt;#    if CO mycookie exists and the value != &#039;XX&#039; then do not redirect
RewriteCond %{HTTP_COOKIE} !^.*mycookie.*$ [NC]
RewriteCond %{HTTP_COOKIE} mycookie=XX [NC]&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Good article here - I have a tricky one that I cannot find the answer to so posting here to see if anyone can help.</p>
<p>I need to create a rewrite condition to detect if a cookie is there. If the cookie is there and the value is not XX then the rewrute rule should apply.</p>
<p>I have got the existance check for the cookie which works but when I add the conditional check for if it is there and value is XX the condition fails :(</p>
<p>Any ideas - the first one works but with the introduction of the second both fail? The scenario will be that some users may have the cookie and some may not. For those that have if the value is set to XX i want to rewrite.</p>
<p>My rule is as below:</p>
<pre>#    if CO mycookie exists and the value != 'XX' then do not redirect
RewriteCond %{HTTP_COOKIE} !^.*mycookie.*$ [NC]
RewriteCond %{HTTP_COOKIE} mycookie=XX [NC]</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul O-H</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1569</link>
		<dc:creator>Paul O-H</dc:creator>
		<pubDate>Thu, 07 Jul 2011 15:39:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1569</guid>
		<description><![CDATA[httpd-2.0.53
Running on port 8040
When connected, how do I prevent the port number from displaying in the URL?
e.g.
Link is http://site:8040
Want URL to display  http://site]]></description>
		<content:encoded><![CDATA[<p>httpd-2.0.53<br />
Running on port 8040<br />
When connected, how do I prevent the port number from displaying in the URL?<br />
e.g.<br />
Link is http://site:8040<br />
Want URL to display  http://site</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ezra</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1568</link>
		<dc:creator>Ezra</dc:creator>
		<pubDate>Thu, 16 Jul 2009 22:47:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1568</guid>
		<description><![CDATA[Thank you so much! I been searching for ages to figure out how to rewrite based on the value of a cookie.]]></description>
		<content:encoded><![CDATA[<p>Thank you so much! I been searching for ages to figure out how to rewrite based on the value of a cookie.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jorge</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1567</link>
		<dc:creator>jorge</dc:creator>
		<pubDate>Thu, 02 Jul 2009 03:29:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1567</guid>
		<description><![CDATA[&lt;p&gt;In the example: &lt;strong&gt;Redirect If Cookie Not Set&lt;/strong&gt;, I think you need space, like:&lt;/p&gt;
&lt;pre&gt;RewriteCond %{HTTP_COOKIE} !^.*cookie-name.*$ [NC]&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>In the example: <strong>Redirect If Cookie Not Set</strong>, I think you need space, like:</p>
<pre>RewriteCond %{HTTP_COOKIE} !^.*cookie-name.*$ [NC]</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jairo Gelvez</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1566</link>
		<dc:creator>Jairo Gelvez</dc:creator>
		<pubDate>Thu, 15 Jan 2009 22:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1566</guid>
		<description><![CDATA[Excelentes ejemplos, me ha quedado muy claro el manejo de las cookies.

&lt;blockquote&gt;Excellent examples, I have been very clear about the handling of cookies.&lt;/blockquote&gt;]]></description>
		<content:encoded><![CDATA[<p>Excelentes ejemplos, me ha quedado muy claro el manejo de las cookies.</p>
<blockquote><p>Excellent examples, I have been very clear about the handling of cookies.</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1565</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 15 Jan 2009 04:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1565</guid>
		<description><![CDATA[Is it possible to set the environment to the value of the URI in the current url?
In other words save the URI until the next visitor arrives.
Using htaccess...]]></description>
		<content:encoded><![CDATA[<p>Is it possible to set the environment to the value of the URI in the current url?<br />
In other words save the URI until the next visitor arrives.<br />
Using htaccess...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1564</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 28 Oct 2008 14:23:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/htaccess/htaccess-fresh.html#comment-1564</guid>
		<description><![CDATA[I was looking for .htaccess examples like these... thank you!]]></description>
		<content:encoded><![CDATA[<p>I was looking for .htaccess examples like these... thank you!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
