Forum Discussion
Ale66
Nimbostratus
May 11, 2010Rewrite rule to single file
Hi all,
this is what we have to do:
typing http://www.aaa.com/xxx
you must be redirect to
http://www.bbb.com/yyy/file.html
but the final domain must be rewritten in order to obtain
http://www.aaa.com/yyy/file.html. (file.html is not a default for the destination http server)
We configured iRules with the external pool (www.bbb.com is an external domain)
The question is: is it possible to do this pointing at a single file?
Thanks in advance
frafra
P.S.
FYI
F5 10.1.0 Build 3372.0
ProxyPass iRule, Version 10.2
- Michael_Yates
Nimbostratus
Hi FraFra,when HTTP_REQUEST { if { [HTTP::host] equals "www.aaa.com" and [HTTP::uri] contains "/xxx" } { HTTP::redirect "http://bbb.com/yyy/file.html" } }
when HTTP_REQUEST { if {[string tolower [HTTP::host]] contains "www.aaa.com"}{ set host [string map -nocase {www.aaa.com www.bbb.com} [HTTP::host]] HTTP::redirect "http://$host[HTTP::uri]" } }
- Ale66
Nimbostratus
Excuse me if I answer only today.
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