Forum Discussion
Pav_70755
Sep 20, 2011Nimbostratus
HTTP Re-Direct uri replace?
I have the following rule written
when HTTP_REQUEST {
if { [HTTP::uri] contains "?storyId=" } {
pool STAGE_directmarketing.thomsonnet.co.uk-80
...
Pav_70755
Sep 21, 2011Nimbostratus
Thanks Brian i'm getting the following error:
line 3: [wrong args] [set wininsert string trimleft [HTTP::uri] 4]
line 7: [wrong args] [set talkinsert string trimleft [HTTP::uri] 5]
line 11: [wrong args] [set findinsert string trimleft [HTTP::uri] 5]
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/win" } {
set wininsert string trimleft [HTTP::uri] 4
HTTP::redirect "http://www.new.com/New-Advice$wininsert"
}
elseif { [HTTP::uri] starts_with "/talk" } {
set talkinsert string trimleft [HTTP::uri] 5
HTTP::redirect "http://www.new.com/New-Advice$talkinsert"
}
elseif { [HTTP::uri] starts_with "/find" } {
set findinsert string trimleft [HTTP::uri] 5
HTTP::redirect "http://www.new.com/New-Advice$findinsert"
}
else {
pool STAGE_www.new.com-80
}
}
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