Forum Discussion
dihris_116090
Oct 26, 2015Nimbostratus
iRule for URL rewriting
Hi All,
I have a query on URL rewriting.
Here is the scenario:
abc.externalurl.com/something/action?key1=value1 --> F5 --> something.internalurl.com/action?key1=value1
secondhost.com ...
ssievers_87378
Oct 26, 2015Nimbostratus
Maybe something like this:
when HTTP_REQUEST {
set val1 [getfield [HTTP::uri] "/" 1]
set val2 [getfield [HTTP::uri] "/" 2]
set my_location "$val1.internalurl.com/$val2"
HTTP::Respond 301 Location "$my_location"
log local0. "Redirecting to $my_location"
}
Cheers.
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