Forum Discussion
Bruce_Walker_11
Nimbostratus
Jun 21, 2010iRule for taking part of an original URI and inserting to a new URL
Hi there,
Was wondering what an iRule would look like that does the following:
Original URL:
Required URL: http://www.environment.domain/globalSearch?q=someuritocopy ...
Kevin_Davies_40
Nacreous
Jun 24, 2010Aaron,
Wrong Host? You want to change the URL host and not the Host header.
when HTTP_REQUEST {
if it matches the request replace the request with a new one passing the old parameter.
if { "[HTTP::host]/[HTTP::path]?[HTTP::query]" starts_with "search.devint.lpo/listing?Ntt=" } {
HTTP::host "www.devint.lpo"
HTTP::uri [concat "/globalSearch?q=" [URI::query "?[HTTP::query]" "Ntt"]]
}
}
when HTTP_REQUEST priority 501 {
...as above...
}
Syntax of the 5th line needs to be verified. Ill test it shortly and report back if there is any issues.
Regards
Kevin
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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