RE: How to strip out the query parameter for specific URLs using mod_rewrite?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sridhar,

This would apply to the whole virtual host. I need to enable it for specific subfolders.

-----Original Message-----
From: sridhar basam [mailto:sridhar.basam@xxxxxxxxx] 
Sent: Thursday, October 04, 2012 9:00 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  How to strip out the query parameter for specific URLs using mod_rewrite?

On Thu, Oct 4, 2012 at 11:03 AM, Bhattacharya, Sudip <sudip.bhattacharya@xxxxxxxxxxx> wrote:
> Hi,
>
> I am trying to configure caching for a website using apache proxy.
>
> Some of the URLs are using a random parameter in the URL to avoid caching.
>
> The URL would look like this:
> http://foo.com/folder/xmlfiles/static.xml?rand= 0.36176968908944995
>
> The xml files are static files, but the application attaches a random number at the end to disable caching. I need to remove the rand parameter to enable caching, without modifying the original application.
>
> There would be other URLs which would have valid query strings, so I need to limit the rewrite operation to the specific xmlfiles folder urls.
>
> Some of the examples on internet seems to be removing the query string from all requests.

The module already supports it for you, you need to just enable it.

http://httpd.apache.org/docs/2.4/mod/mod_cache.html#cacheignorequerystring


Sridhar



>
> Regards,
> Sudip Kumar Bhattacharya
> This e-mail (and any attachments), is confidential and may be 
> privileged. It may be read, copied and used only by intended 
> recipients. Unauthorized access to this e-mail (or attachments) and 
> disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux