Re: Rewrite query string?

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

 



My email stay off my email

From: Frank Gingras <thumbs@xxxxxxxxxx>
Sent: Thursday, January 4, 2024 2:03:49 PM
To: users@xxxxxxxxxxxxxxxx <users@xxxxxxxxxxxxxxxx>
Subject: Re: [users@httpd] Rewrite query string?
 


On Thu, Jan 4, 2024 at 2:53 PM Dave Wreski <dwreski@xxxxxxxxxxxxxxxxxxx.invalid> wrote:

Hi,

I'm trying to replace "searchword" with just "search" in the following URL:

https://example.com/search?searchword=CVE-2021-4014&Search=

I've tried the following RewriteCond/RewriteRule in various forms, but not sure what I'm doing wrong.

RewriteCond %{QUERY_STRING} ^searchword=(.*)
RewriteRule ^   q=$1 [NC,L]

Ideas for what I'm doing wrong would be greatly appreciated.

Thanks,
Dave



Captured values via a RewriteCond are referenced with %1 and not $1.

Either way, I recommend using the rewrite log to see what is actually happening. 

[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