Forum Discussion
Stanislas_Piro2
Mar 29, 2019Cumulonimbus
Do 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