Forum Discussion
Chad_14648
Nimbostratus
Oct 23, 2009domain rewrite
I need to change requests coming in for mydomain.org to mydomain.com but I can't seem to get it working...
3 Replies
- The_Bhattman
Nimbostratus
Hi Chad,
Can you post the iRule that you have been using?
CB - Chad_14648
Nimbostratus
I haven't been using one - this is a new requirement - but this is the closest I've been able to come. It's modified from an example I found.
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"*mydomain.org" { HTTP::header replace "Host" [string map {"mydomain.org" "mydoming.com"} [HTTP::host]] }
}
} - The_Bhattman
Nimbostratus
Hi Chad,
Try the following:when HTTP_REQEUST { if { [HTTP::host] eq "mydomain.org" } { HTTP::redirect "http://mydomain.com/[HTTP::uri]" } }
I hope this helps
CB
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
