Forum Discussion
pkhatri_72515
Nimbostratus
Jan 15, 2010need 301 redirect help please.
301 redirect of following. Can you please help me out on a best way to do this in F5? iRule? version 9.3.
http://www.bla.com/home/index.cfm?&LANG=EN&CountryLanguage=EN_GL -------> http:...
naladar_65658
Altostratus
Jan 15, 2010I am not certain how elegant this is and I haven't had a chance to test it out, but this should get you going in the right direction:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri] ] {
"*countrylanguage=en_gl*" {
HTTP::respond 301 Location http://www.bla.com/gl
}
"*countrylanguage=en_ap*" {
HTTP::respond 301 Location http://www.bla.com/ap
}
"*countrylanguage=fr*" {
HTTP::respond 301 Location http://www.bla.com/fr
}
"*countrylanguage=de*" {
HTTP::respond 301 Location http://www.bla.com/de
}
"*countrylanguage=en_ir*" {
HTTP::respond 301 Location http://www.bla.com/ie
}
"*countrylanguage=it*" {
HTTP::respond 301 Location http://www.bla.com/it
}
"*countrylanguage=nl*" {
HTTP::respond 301 Location http://www.bla.com/nl
}
"*countrylanguage=pr*" {
HTTP::respond 301 Location http://www.bla.com/pr
}
"*countrylanguage=sp*" {
HTTP::respond 301 Location http://www.bla.com/es
}
"*countrylanguage=sw*" {
HTTP::respond 301 Location http://www.bla.com/se
}
"*countrylanguage=en_uk*" {
HTTP::respond 301 Location http://www.bla.com/uk
}
}
} 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