Forum Discussion
ema_128890
Jan 28, 2016Nimbostratus
Https redirect
I'm trying to redirect https://test.com to https://test.com/testing. Here is what I have so far
when HTTP_REQUEST {
if { [HTTP::host] equals "test.com" } {
HTTP::redirect "https://tes...
- Jan 28, 2016
You need to examine [HTTP::uri] as well. So that your if clause does not trigger for every request, but instead only for where uri is set to /.
Something like this
when HTTP_REQUEST { if { [HTTP::host] equals "test.com" && [HTTP::uri] equals "/" } { HTTP::redirect "https://test.com/testing" } }
/Andreas
ema_128890
Jan 28, 2016Nimbostratus
Thank you that worked
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