Forum Discussion
Sean_O_Brien_65
Nimbostratus
Apr 13, 2010iRule forward URL to different domain for http and https
We are planning a website cutover to another (new) existing domain, both going through the F5 currently...
This weekend I will change the DNS to point to different VS on F5 and at that point I will be implementing an iRule to change the old url request (such as in peoples bookmarks, etc...) to point to the new url with a different domain.
I created a test VS and pool to test the iRule I have below, and I believe my problem is forwarding both http and https requests with one iRule.
This is what I have now:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"domain1.com" { HTTP::redirect "https://domain1.domain2.com"
}
"www.domain1.com" {
HTTP::redirect "https://domain1.domain2.com"
}
}
}
As it stands, when I try to go to my "domain1.com" after updating my hosts file to point to test VS, I get page not found... Also, if I try https://www.domain1.com, I get an SSL error and it stays as domain1.com in the address bar. Thanks for any help!
5 Replies
- StephanManthey
Nacreous
Hi Jeremy,
the user needs so called "advanced shell" privileges. Perhaps you just provided access to "tmsh" and it cannot use the bash. Now a command file i.e. as follows can be used:tmsh show ltm virtual | grep -B 4 -iE '^[[:blank:]]*availability.*(offline|unknown)'
Thanks, Stephan
- Jeremy_Hobbs_18
Nimbostratus
When working from bash you can use "-B4". When in TMSH, you need a space Like "-B 4".
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