Forum Discussion
abeny_894
Nimbostratus
Oct 29, 2009URL rewrite
Hi all,
I have a question on URL re-write,
can I use i-Rules to re-write the following URL like? if yes, is it the same meaning as redirect? coz after rewrite the URL, http request should be redirected to the mentioned rewrite URL, am I right?
Example:
http://www.f5.com ----> VIP ---> http://www.yahoo.com/search?q=www.f5.com
For iRules, how can I archieve this?
Thanks a lot
Abeny
- abeny_894
Nimbostratus
Anyone can help or give me some suggestions? thanks - hoolio
Cirrostratus
Hi Abeny,when HTTP_REQUEST { Redirect all requests to http://www.yahoo.com/search?q=$host where $host is the originally requested hostname HTTP::respond 302 noserver Location "http://www.yahoo.com/search?q=[HTTP::host]" }
when HTTP_REQUEST { Rewrite the hsot header to www.yahoo.com and the uri to /search?q=$host where $host is the originally requested hostname HTTP::header replace "www.yahoo.com" HTTP::uri "/search?q=[HTTP::host]" }
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