Post Reply 
how to find/replace part of the url
Aug. 17, 2017, 01:40 PM
Post: #1
how to find/replace part of the url
Hello,
i need to to add a suffix in the end of a specified url, each time it's being loaded..
for example i want http://google.com/q=hello
to be http://google.com/q=hello&c=1
adding "&c=1" at the end
or
simply replace any url containing "q=hello" to "q=hello&c=1"
thanks in advance.
Add Thank You Quote this message in a reply
Aug. 18, 2017, 12:51 PM
Post: #2
RE: how to find/replace part of the url
this does that, would just need edited to fit your needs -
Code:
In = FALSE
Out = TRUE
Key = "! : JUMP: Google complete off (out) (13.03.30) [ADD]"
URL = "(www|[^/]++.encrypted).google.(*/)+{1}(^(images|csi)\?)((^?)$SET(\0=webhp?)|(^local)(*\?)+{1}(^(*\&)++complete=[0-9])$SET(\0=&))&$JUMP(\u\0complete=0)"
Replace = "$LOG(R$DTM(c) JUMP to google complete off)"
Add Thank You Quote this message in a reply
Aug. 18, 2017, 02:38 PM
Post: #3
RE: how to find/replace part of the url
Don't use "URL:" when maintaining header filter order is necessary.
"URL:" match includes protocol.
$URL match includes protocol.
Add a domain match. Leading wildcards use more time.

Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "! : JUMP: q=hello to q=hello&c=1 (out)"
URL = "*q=hello(^\&c=1)$URL(\1q=hello\2)$JUMP(\1q=hello&c=1\2)"

Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "URL: Jump q=hello to q=hello&c=1 (out)"
Match = "\1q=hello(^\&c=1)\2"
Replace = "$JUMP(\1q=hello&c=1\2)"
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: