Forum Discussion
amebiz_142234
Mar 14, 2018Nimbostratus
protocol and sub domain redirect
hi guys,
i want to redirect like that:
http://domain.com -> https://www.domain.com
http://domain.com/something -> https://www.domain.com/something
http://www.domain.com -> https://www.domain.com
h...
- Mar 14, 2018
I don't know if this is the most straightforward way of doing it or not but I hope this works for you:
when HTTP_REQUEST { switch [HTTP::host] { domain.com { HTTP::redirect "https://www.domain.com[HTTP::uri]" } www.domain.com { HTTP::redirect "https://www.domain.com[HTTP::uri]" } } }
Darren_Walker_2
Mar 14, 2018Cirrus
I don't know if this is the most straightforward way of doing it or not but I hope this works for you:
when HTTP_REQUEST {
switch [HTTP::host] {
domain.com {
HTTP::redirect "https://www.domain.com[HTTP::uri]"
}
www.domain.com {
HTTP::redirect "https://www.domain.com[HTTP::uri]"
}
}
}
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