Forum Discussion
Angelo
Nimbostratus
May 13, 2013redirect Multiple URL's
Hi
I got a rule to redirect multiple URL's to anothers but i'm not sure if it's going to work..
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"...
What_Lies_Bene1
Cirrostratus
May 13, 2013OK, so this should do it whilst preserving the original request URI;
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"www.test.com" { HTTP::redirect "http://www.test201.net[string tolower [HTTP::uri]]" }
"www.example.com" { HTTP::redirect "http://www.example403.net[string tolower [HTTP::uri]]" }
"www.something.com" { HTTP::redirect "http://www.example403.net[string tolower [HTTP::uri]]" }
"www.testing.com" { HTTP::redirect "http://www.example403.net[string tolower [HTTP::uri]]" }
default {
reject }
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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