Forum Discussion
JonasD_46068
Nimbostratus
Mar 15, 2007REDIRECTION ISSUE
I got the following iRule from someone in this forum:
when HTTP_REQUEST {
set userhost [HTTP::host]
if { $userhost == "testdomain.org"} {
set userhost "www.[HTTP::host]"
...
JonasD_46068
Nimbostratus
Mar 15, 2007I tried to use an elseif to add the subdomain.testdomain.com and it is appending www.subdomain.testdomain.com which does NOT exist. So I am close but no cigar. I see 'why' it did it but I"m not sure how to fix. Here's what I tried that didn't quite work:
when HTTP_REQUEST {
set userhost [HTTP::host]
if { $userhost == "testdomain.org"} {
set userhost "www.[HTTP::host]"
}
elseif { $userhost == "ml.testdomain.org"} {
set userhost "www.[HTTP::host]"
}
HTTP::redirect https://$userhost[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
