Forum Discussion
Shannon_Ryan_83
Nimbostratus
Dec 10, 2005Simple url redirection not working (ssl)
Trying to redirect a request to the root of a webserver to a folder. Example, user types https://www.aaa.com and i want to redirect to https://www.aaa.com/bbb.
when HTTP_REQUEST {
if { not [HTTP::uri] contains "/bbb"} {
HTTP::redirect "https://www.aaa.com/bbb" }
}
Is the https my problem?
Thanks.
3 Replies
- Shannon_Ryan_83
Nimbostratus
problem solved... does anyone see any problems with this: - Brian_Gupta_115
Nimbostratus
Do you want an actual redirect response to be sent to the browser? - JRahm
Admin
It depends on how your virtual is set up. If you have only port 80 set up on your virtual, then the https will be problematic if you haven't also set up a port 443 virtual on the same host. The redirection rule I use for clients that submit only the host or the host with the trailing slash is:when HTTP_REQUEST { if { ([ string length [HTTP::uri] ] <= 1) } { HTTP::redirect https://[HTTP::host]/bbb } }
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