Forum Discussion
Joe_Pipitone
Nimbostratus
May 12, 2010More conflicts with redirect iRule
I am getting the following error with the iRule below. Something about no such variable when executing. Perhaps this is because there is no URI sometimes if the user requests the homepage? Can anyo...
Joe_Pipitone
Nimbostratus
May 13, 2010I've been able to use an answer from another post to fix this issue.
I appreciate your time and effort in helping me get this resolved - it is greatly appreciated!
It seemed to have worked by using this code:
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.oursite.com") } {
HTTP::redirect "http://oursite.com[HTTP::uri]"
return
}
switch -glob [string tolower [HTTP::uri]] {
"/survey" -
"/survey/" {
HTTP::redirect "http://oursite.com/surveys/"
return
}
"/salarysurveys" {
HTTP::redirect "http://oursite.com/surveys/"
return
}
"/images*" {
HTTP::redirect "http://legacy.oursite.com[HTTP::uri]"
return
}
}
}
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