Forum Discussion
Problem with URL redirection
This is working
on my VS for https
when HTTP_REQUEST { if { [HTTP::uri] matches_regex {.ghjk.do} } { HTTP::redirect "" } if { [ string tolower [HTTP::uri]] equals"/" } { HTTP::redirect "" } if { [TCP::local_port] != 443 } { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
On my VS for port 80
when HTTP_REQUEST { if {[TCP::local_port] != "443"} { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } else { if { [HTTP::host] matches_regex {.ghjk.do}} { HTTP::redirect "" } elseif { [HTTP::uri] == "/"} { HTTP::redirect "" } } }
Thanks for your help Michael
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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