Forum Discussion
yogpog_205998
Nimbostratus
Jul 29, 2015301 redirection irule
Dear Team,
Currently under Port 80 below irule is configured
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" {
HTTP::redirect "https://[HTTP::host]/XXX.aspx"
...
Kevin_Stewart
Employee
Jul 29, 2015Try this:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::respond 301 Location "https://[HTTP::host]/XXX.aspx"
}
}
You don't really benefit from a switch if you're only evaluating one thing, and there's no need to do [string tolower ] if you're just checking for "/".
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