Forum Discussion
H_Y
Nimbostratus
Jun 25, 2020Redirect with modified Host and URI from variable
Hello, I am very new to iRules and facing an issue while trying to redirect based on the below scenario. Trying to achieve HTTPS://mydomain1.com/"clientname" to HTTPS://demo-"clientname".mydoma...
Samir
MVP
Jul 05, 2020Some correction needed in iRule. Go with this..
when HTTP_REQUEST {
set clientname [string tolower[getfield [HTTP::uri] "/" 2]]
if { [class match [string tolower[getfield [HTTP::uri] "/" 2]] equals clientnames_dg] } {
HTTP::respond 301 Location "https://demo-$clientname.mydomain2.com/$clientname"
}
}Thanks
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