Forum Discussion
Pete_Paiva_7147
Nimbostratus
Aug 28, 2007https to http redirect
I'm looking to create an iRule that will take https://my.mycompany.com and redirect it to http://my.mycompany.com.
So in other words, if someone were to put in https:// it would redirect them to http:// -- the URL would stay exactly the same.
Any help would be greatly appreciated.
Thanks,
-Pete
- Pete_Paiva_7147
Nimbostratus
Hamish, - Wil_Schultz_101
Nimbostratus
I have a similar setup in one of my rules, this is a permanent redirect (301):when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "my.mycompany.com" { HTTP::respond 301 \ "Location" "http://my.mycompany.com[HTTP::uri]" \ return 0 } } }
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "my.mycompany.com" { HTTP::redirect "http://my.mycompany.com[HTTP::uri]" return 0 } } }
- Pete_Paiva_7147
Nimbostratus
I think I'm doing something wrong -- neither of the 2 iRules seem to be working correctly. I replaced the "my.mycompany.com" with the actual URL but still not having any luck. The https url doesn't seem to be redirecting to http.
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