Forum Discussion
Redirect url to longer url
Hello need some help with an iRule redirect if possible:
we have two vips 80 and 443
80 vip has the standard https redirect irule "_sys_https_redirect"
we have a website at https://test.domain.com/ecm/login/auth and want users to get redirected to this full url when navigating to http://test.domain.com how can I achieve this? Any help is appreciated.
- Kevin_Stewart
Employee
The port 80 VIP's redirect rule is best as is.
Once on the port 443 VIP, you can use something like this to redirect to the correct URI:
if { [HTTP::uri] equals "/" } { HTTP::redirect "/ecm/login/auth" }
Keep in mind that even if the browser doesn't specify a trailing slash in the URL (ex. https://test.domain.com), the resulting HTTP::uri is still "/", so the above works for both "; and ";
- Stanislas_Piro2
Cumulonimbus
Thomas,
You can do it with a LTM policy instead of irule
Create one rule in this policy
- condition : http-host path is in /
- action : http-reply redirect /ECM/login/auth
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