Forum Discussion
minche22_258903
Nimbostratus
Apr 13, 2016irule to remove url ending
hello,
i need to write an irule to redirect user to the same url but without the file at the end.
for example if user request http://www.example.com/test.cgi?parm1=test&parm2=test2 or http://www.exam...
ekaleido_26616
Cirrocumulus
Apr 13, 2016This, maybe?
when HTTP_REQUEST {
if { [HTTP::path] equals "/test.cgi" } {
set queryString [HTTP::query]
HTTP::redirect http://[HTTP::host]/?$queryString
} else {
pool whatever_pool
}
}
minche22_258903
Nimbostratus
Apr 13, 2016i don't see why i need an else statement also, but your solution wont work on the second condition:
http://www.example.com/bla/bla/test.cgi
it will erase the full path....
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects