The Un-Official Proxomitron Forum
how to find/replace part of the url - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Forum Related (/forumdisplay.php?fid=37)
+--- Forum: Proxomitron Program (/forumdisplay.php?fid=4)
+--- Thread: how to find/replace part of the url (/showthread.php?tid=2316)



how to find/replace part of the url - yazan - Aug. 17, 2017 01:40 PM

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.


RE: how to find/replace part of the url - ProxRocks - Aug. 18, 2017 12:51 PM

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



RE: how to find/replace part of the url - JJoe - Aug. 18, 2017 02:38 PM

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