# detect right proxy RewriteRule .* - [E=proxy:http://${pliant_config:proxy}] RewriteRule .* - [E=browser_key:http://${pliant_config:browser_key}] RewriteRule .* - [E=active_key:http://${pliant_config:active_key}] # cache detect: RewriteCond %{env:browser_key},,,%{HTTP_COOKIE} !(.+?),,,.*SID=\1 [NC] RewriteCond %{env:active_key},,,%{HTTP_COOKIE} !(.+?),,,.*SID=\1 [NC] RewriteCond %{env:active_key},%{QUERY_STRING} !(.+),sid=\1 RewriteCond %{env:active_key},,,%{REQUEST_URI} !(.+),,,/_/.*\1 RewriteCond %{QUERY_STRING} !^active RewriteRule .* - [E=proxy:http://${pliant_config:cache_proxy|%{env:proxy}}] # cache forced: RewriteCond %{QUERY_STRING} ^inactive RewriteRule .* - [E=proxy:http://${pliant_config:cache_proxy|%{env:proxy}}] RewriteCond %{REQUEST_URI} ^/_/ RewriteRule ^(.*)$ %{env:proxy}$1 [P,L,QSA]