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:...
Brandon_83145
Nimbostratus
Jan 19, 2010Related question. Can someone help combine a redirect rule that looks for both the host and uri (everything after the /)?
Our existing rule which uses HTTP::host works just fine:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"*sample*" {HTTP::redirect "http://site.sample.com/default.aspx"}
"*test*" {HTTP::redirect "https://site.test.com/Pages/home.aspx"}
default {HTTP::redirect "https://www.test.com"}
}
}
Problem now is that I'm being asked to redirect *sample.com/folder1 to -> http://site.sample.com/folder1. I tried adding an IF before the switch statement (using HTTP::path and HTTP::uri) with minimal success. How would you go about doing this?
Thanks in advance for the support.
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