Forum Discussion
Phil_Carroll_13
Nimbostratus
Aug 14, 2013Conditional redirect based on passed parameters...
Hello All,
I need help with creating a rule that would do the following...
If the http request is www.domain.com or domain.com then it needs redirected to www.redirect.domain\page
If...
JRahm
Admin
Aug 14, 2013That doesn't account for the specific domain, though, and I think the intent is that /page is whatever was sent to the original request as a uri. If that's the case, Phil, something like this should work:
when HTTP_REQUEST {
if { [domain [HTTP::host] 2] eq "domain.com" } {
HTTP::redirect "http://www.redirect-domain.com[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