Forum Discussion
ivanchen0503_36
Nimbostratus
Mar 28, 2019iRule how to use rewrite by same token ?
Im not sure about F5 iRule can or not solve this solution , i need rewrite
to , only rewrite "iphone.aspx" to "mobile" this key point and the token number need same .. anyone can help this ? thanks...
stan_piron
Cumulonimbus
Mar 28, 2019Do you want to rewrite or redirect?
For a rewrite:
when HTTP_REQUEST {
if { [HTTP::path] equals "/iphone.aspx" } {
HTTP::path "/mobile"
}
}
For a redirect
when HTTP_REQUEST {
if { [HTTP::path] equals "/iphone.aspx" } {
HTTP::redirect [join [list "/mobile" [HTTP::query]] "?" ]
}
}
Join command is there to add question mark only if query string is not empty
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