Forum Discussion
Jose_TOVAR
Nimbostratus
Dec 17, 2018datagroup host redirect class match appending original URI
perform redirect based-host appending original URI
Rico
Cirrus
Dec 27, 2018First off, I personally think there are much better and easier ways to do what you are trying to accomplish here since it seems like all you need to do is prepend "; to your requests, but if you are partial to the system you have here, a simple change to your iRule will allow you to keep the URI intact.
when HTTP_REQUEST {
if { [class match [HTTP::host]/ eq datagrp_redirect] } {
HTTP::redirect [class match -value [HTTP::host]/ eq datagrp_redirect ][HTTP::uri]
}
}
I would highly recommend changing the iRule to be more general such as this:
when HTTP_REQUEST {
if {[class match [HTTP::host][HTTP::uri] eq datagrp_redirect]}
{
HTTP::redirect https://www.[HTTP::host][HTTP::uri]
}
}
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