On 4 Oct 2012, at 16:52, Ben Johnson wrote:

> 
> 
> On 10/4/2012 11:32 AM, Bhattacharya, Sudip wrote:
>> Hi Sridhar,
>> 
>> This would apply to the whole virtual host. I need to enable it for specific 
>> subfolders.
> 
> Something like this should work:
> 
> RewriteCond %{REQUEST_URI} =/folder/xmlfiles/static.xml
> RewriteCond %{QUERY_STRING} !=""
> #The ? at the end causes the %{QUERY_STRING} to be omitted
> #from %{REQUEST_URI} during rewriting.
> RewriteRule ^(.*)$ %{REQUEST_URI}? [R=301,L]
> 
> If any mod_rewrite expert has suggestions or revisions, please jump in.

OTTOMH I doubt that would work.  The rewrite would come too late to
stop mod_cache seeing and acting on the query string.  But I could
be wrong.

The ideal solution would be to strip off those query strings before they
ever reach the browser (which also helps the browser itself to cache things).
Are they generated as links or as HTTP redirects?  If links then a
ProxyHTMLURLMap (if the performance hit of parsing HTML is acceptable);
if HTTP headers then a ProxyPassReverse variant would seem a startingpoint.

-- 
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to