Forum Discussion
johnmervin_4578
Feb 16, 2017Altostratus
Need to replace URL and URI
I am looking for a irule so that when I hit
john.a.com\A it need to redirect to http://whoisjohn.a.com/shortname=A
john.a.com\B it need to redirect to http://whoisjohn.a.com/shortname=B
john.a.com\C...
- Feb 17, 2017
I played around and come up with this and meet my requirements
when HTTP_REQUEST { if {[HTTP::host] contains "john" }
{ HTTP::redirect "http://whoisjohn.a.com/shortname=[substr [HTTP::uri] 1]"
}
}
substr "1" command basically strips of the "/" on the client request
johnmervin_4578
Feb 17, 2017Altostratus
I played around and come up with this and meet my requirements
when HTTP_REQUEST { if {[HTTP::host] contains "john" }
{ HTTP::redirect "http://whoisjohn.a.com/shortname=[substr [HTTP::uri] 1]"
}
}
substr "1" command basically strips of the "/" on the client request
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