Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Antony Stone
On Thursday 04 January 2024 at 23:18:52, Frank Gingras wrote: > On Thu, Jan 4, 2024 at 5:03 PM Will Fatherley wrote: > > > > RewriteCond to know. Also, isn’t that the “starts with” operator, ^? What > > if the parameter comes second? A bit verbose, but: > > ^.*searchword=(\w{1})[&]{0,1}.*$ > >

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Will Fatherley
> > 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 woul

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Frank Gingras
On Thu, Jan 4, 2024 at 5:03 PM Will Fatherley wrote: > > 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 ^

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Will Fatherley
> 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 great

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Eric Covener
> However, this change is not reflected in the Location bar in my browser. You can append the 'R' flag if you need it to redirect. Otherwise, just the internal representation is changed. RewriteRule ^ %{REQUEST_URI}?search=%1 [NC,L,R] -

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Dave Wreski
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

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Kristina Nicklas Walters
My email stay off my email From: Frank Gingras Sent: Thursday, January 4, 2024 2:03:49 PM To: users@httpd.apache.org Subject: Re: [users@httpd] Rewrite query string? On Thu, Jan 4, 2024 at 2:53 PM Dave Wreski wrote: Hi, I'm trying to replace "searchword" wi

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Frank Gingras
On Thu, Jan 4, 2024 at 2:53 PM Dave Wreski 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 do

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Eric Covener
> RewriteRule ^/search$ %{REQUEST_URI}?search=%1 [NC,L] probably should restrict to /search as edited - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Eric Covener
On Thu, Jan 4, 2024 at 2:53 PM Dave Wreski 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

[users@httpd] Rewrite query string?

2024-01-04 Thread Dave Wreski
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=(.*) Rewri