Forum Discussion
URL Maintenance Page irule
Hello guys I need some support with irule : - is it possible to change this irule in way when some specific www is requested than its going to MP . I dont need option with pool members = 0 there will be some work done on specific site
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::respond 200 content {
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.}
}
}
- tatmotivCirrostratusCan you elaborate what you mean by "when some specific www is requested"? Are you talking about an URI, an HTTP Host or something else??
- slesh_219299Cirrus
Hi tatmotiv thanks for fast replay and : I mean f.e.: when someone wants to go to www.google.com/shop/x1 it will use
HTTP::respond 200 content { <h1><br><b>xxxxxxxxxxxxxx</b><br></h1> <b>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.} } } If its possible to create 1 for uri and 1 for host
- Jaroslaw1986Nimbostratus
should it be depend of pool member activity or not?
- slesh_219299CirrusIt would be great to get in hands both version uri and http host
- tatmotivCirrostratus
I still do not exactly understand what you are planning to do, but generally speaking, it is possible to create an iRule that takes the URI and the host header into account. Taking your example above, the host would be "www.google.com" and the URI would be "/shop/x1". You can do with that whatever you like, e.g.:
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/shop/x1" } { HTTP::respond 200 content { } } }
or
when HTTP_REQUEST { if { [string tolower [HTTP::host]] starts_with "www.google.com" } { HTTP::respond 200 content { } } }
Is that what you meant??
Recent Discussions
Related Content
* 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