Forum Discussion
sonu_kumar4
Altostratus
Jul 05, 2016Specific URL redirection and other redirection should be unavailable
Hello Guys,
Your urgent suggestion required on below case which I got recently to implement in production and as long as I know it could be done through i-rules but its’ TCL script and in which I don...
Vijay_E
Cirrus
Jul 05, 2016Try the following with iFile:
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.abcd.com") and ([HTTP::uri] eq "/")} {
HTTP::uri [HTTP::uri]/def/geh/100
pool POOL_WEB_SERVERS
} else {
HTTP::respond 200 content [ifile get "maint_index_html"] Cache-Control No-Cache Pragma No-Cache
}
}
A simpler version:
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.abcd.com") and ([HTTP::uri] eq "/")} {
HTTP::uri [HTTP::uri]/def/geh/100
pool POOL_WEB_SERVERS
log local0. "New URI - [HTTP::uri] - [LB::server pool]"
} else {
HTTP::respond 301 Location "http://redirectpage.com" Cache-Control No-Cache Pragma No-Cache
}
}
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