Forum Discussion
alinayesina_102
Nov 15, 2011Nimbostratus
Dynamic URI rewrite
Where xxxxx is numeric variable
https://www.abc.com/uri/oldpage.aspx?xxxxxxx
redirect to
https://www.xyz.com/uri/newpage.aspx?xxxxxxx
Thank you for help!
nitass
Nov 16, 2011Employee
just another example.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.65.152:https
ip protocol tcp
rules myrule
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "www.abc.com"}{
if {[string tolower [HTTP::uri]] contains "oldpage.aspx"}{
HTTP::respond 302 noserver Location "https://www.xyz.com[string map -nocase {"oldpage.aspx" "newpage.aspx"} [HTTP::uri]]"
}
}
}
}
[root@ve1023:Active] config curl -Ik https://www.abc.com/uri/oldpage.aspx?12345
HTTP/1.0 302 Found
Location: https://www.xyz.com/uri/newpage.aspx?12345
Connection: Keep-Alive
Content-Length: 0
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