Forum Discussion
Sean_O_Brien_65
Feb 23, 2011Nimbostratus
Looking for iRule to forward based on uri
I have an iRule here:
when HTTP_REQUEST {
if {[HTTP::uri] eq "/proposals/webpagenumber1*" } {
HTTP::redirect "http://domain2.com/Services_and_Products/sub1/sub2/P...
Sean_O_Brien_65
Feb 23, 2011Nimbostratus
So after some more playing, I ended up with this, which works fine:
when HTTP_REQUEST {
if {[HTTP::uri] eq "/proposals/AccessControl.htm" } {
HTTP::redirect "http://domain2.com/sub1/Construction/Proposals/AccessControl"
}
if {[HTTP::uri] eq "/proposals/Davis.htm" } {
HTTP::redirect "http://domain2.com/sub1/Construction/Proposals/Maintenance"
}
if {[HTTP::uri] eq "/" } {
HTTP::redirect "http://domain2.com/sub1/Construction"
}
}
My only remaining question is: Can I use a better 'default' for that last line to go to the 'home' of the site than the "/". If people type in anything other than the domain name, or the "/" they will not get forwarded.
Thanks again for the help!
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