Forum Discussion
irule for redirection of url is notworking as expeced.
Hi All, I have new rule configured
when HTTP_REQUEST { if { (([HTTP::host] equals ";) or ([HTTP::host] equals "198.x.x.x.")) } { HTTP::redirect "; } }
I have create New VIPs for stage.omega.com which hasNATed public ip with 198.x ip along with public DNS which works fine with DNs as well as IP ,I have created one more vip stage.mega.com and NATED with public ip and public DNS and taged the above irule into stage.mega.com vip to have redirection that if any user hitting https://stage.mega.com should redirect to https://stage.omega.com.
redirection is working fine when i access the but it is not working when i access the url like https://stage.mega.com
can some one let me know if i am missing or need to add any thing to irule ?
1 Reply
- Ed_Summers
Nimbostratus
The HOST header includes the hostname only (and service port if non-standard), not the protocol ("https"). Change your HOST test to only "stage.mega.com" (removing protocol and all slashes) and re-test.
Reference: DevCentral Article for HTTP::host
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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