dacrud_18985
Sep 16, 2008Nimbostratus
remove everything after question mark
Hi all,
I have a URL like so:
http://www.domain.com/popular_stuff/list/5?id_session=BLAHBLAHBLAHBLAH
and I need to strip everything after the question mark and only return the path of the URL like this (in the body of the html):
/popular_stuff/list/5
Would this work:
rule strip_question {
when HTTP_REQUEST {
if { [HTTP::uri] contains "/popular_stuff/list"} {
HTTP::respond 200 content "[HTTP::path]"
}
}
}