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
...
Brian_69413
Sep 20, 2011Nimbostratus
A couple things:
1. Are you trying to replace the existing iRule with the new requirements or merge them together? I see a conflict with the first else if.
2. Put "STAGE_www.new.com-80" in as the default pool and get rid of the else statement as it is unnecessary.
3. You are going to have to use string manipulation to get this to work right. I listed the process below(this is not code):
-Find out if it matches the condition: [HTTP::uri] starts_with "/win"
-Modify the original uri: A new variable with a substr of [HTTP::uir] to get rid of the "/win"
-Redirect to the new URL: HTTP::redirect [HTTP::host]+"/News-Advice"+$new_var
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