Forum Discussion
iRule for url redirect for internal application.
We have users that are used to typing in to get to our help page. We are making changes and have the new help desk software behind the F5. We want them to type in and get redirected to How would I go about this if I create a new virtual server to handle this. I am not very proficient at writing iRules.
2 Replies
- AndOs
Cirrostratus
Create a new iRule and use something similar to this
when HTTP_REQUEST { if { [HTTP::host] equals "help" } { HTTP::redirect "https://url/dgg" } }
(untested, I grabbed an example from here https://devcentral.f5.com/questions/redirect-testexamplecom-to-testexamplecom-abc-def-ghi)
Also make sure that your VIP have an HTTP profile and a client ssl profile with a valid certificate.
If the URL that's redirected to ("url") points to the same VIP as "help", make sure that the certificate used is valid for both hostnames.
Hope it helps.
/Andreas
- Srini_87152
Cirrostratus
hi,
you can try following switch rule too..
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/help" { HTTP::redirect ";}
} }
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