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]

 




On 10/4/2012 12:01 PM, Bhattacharya, Sudip wrote:
> Great. This one worked.
> 
> However, it looks like the first request with the query string returns a 301 moved permanently response, requiring another request from the browser to the file without the query string.
> 
> Can this redirection be avoided, so that the server returns the cached file on the original response only?

Just change the last line to the following (to use Pass-Through, instead
of Redirecting with a specific status code):

RewriteRule ^(.*)$ %{REQUEST_URI}? [PT,L]

P.S. I can't speak to Nick Kew's comments (I don't use mod_cache), so
you'll just have to test this and see if it works for your purposes.

Good luck,

-Ben

---------------------------------------------------------------------
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