Forum Discussion
newmedia_129255
Nimbostratus
Jul 18, 2013Help with irules redirect
Thanks in advance. The first irule works but the last one with the / appears not to be working and I was told that I need a uri. Can you please examine and let me know if the most effiecient way of d...
bwolmarans_1284
Jul 18, 2013Historic F5 Account
Hi NewMedia,
I don't have much time to reply, so this is "sub-optimal" as they say but this will work:
when HTTP_REQUEST {
log local0. "Requested uri is: [HTTP::uri] "
if { [string tolower [HTTP::uri]] starts_with "/public2" } {
HTTP::respond 302 Location "http://mywebsite.website4.com/public2"
} elseif { [string tolower [HTTP::uri]] starts_with "/public" } {
HTTP::respond 302 Location "http://mywebsite.website4.com/pubilc"
} else {
pool Web_Servers
}
}
There is a better way, I'm sure, but I don't have time right now. But that will work for now.
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