Forum Discussion
Magnum_IP
May 03, 2011Nimbostratus
Routing using the virtual command
I'm having a problem routing traffic using the virtual command on HTTPS and hope that someone can help.
I have everything working on HTTP I just can't get HTTPS to work.
Basically when a certain condition is met I want to change the URI and route the traffic back into the same virtual server without the user seeing a change in URL i.e. I don't want to use a 302 redirect.
I have sanitised this but something along the lines of
when HTTP_REQUEST {
...
if {$myVar < 1} {
HTTP::uri "/new.html"
virtual [virtual name]
}
}
I'm suspecting that the issue with HTTPS is to do with the Client/ServerSSL profiles, I was wondering if the ServerSSL profile was being used with the new connection to the virtual server. At any rate I get a Connection Reset.
Any ideas how I can solve or better troubleshoot my issue?
Regards,
fergu5
- L4L7_53191NimbostratusI may be mistaken, but it reads like you're trying to send a connection back to the same virtual server it originated on - is this correct? If so, note that you can change the URI and simply send the request back to the pool member transparently (i.e., no vip targeting). Or, you may consider looking into the Proxypass iRule.
- Colin_Walker_12Historic F5 AccountMatt makes an excellent point, there's no reason at all to route back into the same virtual just to change a URI. The HTTP::uri command will do that transparently for you.
- Magnum_IPNimbostratusColin, L4L7,
- Colin_Walker_12Historic F5 AccountAhhh, I see now.
If the all members in the default pool are down, redirect to the maintenance page if { [active_members [LB::server pool]] < 1 } { HTTP::respond 200 content [lindex $::maint_index_html_class 0] "Content-Type" "text/html" } }
- hooleylistCirrostratusI think Colin's answer is right, but if you're sending back maintenance content with an HTTP 200, make sure to set cache control headers so any intermediate proxies do not cache the response content:
- Colin_Walker_12Historic F5 AccountYeah yeah, details. ;)
- Magnum_IPNimbostratusCool, thanks - I'll give this a whirl in my test environment tomorrow - I will attempt to incorporate all of the above. In my opinion it should lead to quite a sweet maintenance page experience, a nice functional improvement on the existing code share item.
- Colin_Walker_12Historic F5 AccountTo put the box around the code put it in code sections.
- Magnum_IPNimbostratusGot the updated Maintenence Page iRule working in my test environment but i think it would be good if you guys could take a look over it and give me your feedback.
- Magnum_IPNimbostratusIt was a steep learning curve ;-) but
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