27-Jul-2020 12:14
HELLO,
-http://www.abc.com/C1234" >>> I want to match on http://www.abc.com/xyz/qsdf=C1234
-http://www.abc.com/C4536" >>> I want to match on http://www.abc.com/xyz/qsdf=C4536
-http://www.abc.com/C7865" >>> I want to match on http://www.abc.com/xyz/qsdf=C7865
......
anything numbers after /C
thank you for your answer
28-Jul-2020
02:01
- last edited on
04-Jun-2023
21:21
by
JimmyPackets
Hi mika,
when HTTP_REQUEST {
if { [HTTP::uri] matches_regex {\/C[0-9]{1,4}} } {
set uri "/xyz/qsdf=[string trimleft [HTTP::uri] \"/\"]"
# log local0. "newUri: $uri"
HTTP::redirect "http://www.abc.com$uri"
}
}
28-Jul-2020 03:52
thank you 🙂