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 ...
hoolio
Cirrostratus
Jun 25, 2010Hi Kev,
By default most HTTP user agents don't use fully qualified URLs in the URI field. So you can just replace the HTTP host header using 'HTTP::header replace Host "newhost.example.com". If a user agent did include the host in a fully qualified URL in the URI, the server must ignore the host header. In that case, you'd want to replace the host portion in the URI. However, the only times I've seen clients doing this is when they're using a web proxy. Most web proxies convert the URI to a local reference when sending the requests on.
Also, HTTP::host only allows you to retrieve the host header value--not set it.
Aaron
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