Forum Discussion
Mark_57933
Nimbostratus
Sep 27, 20112 iRules - HTTP rewrites keeping info from rule to rule
Hi:- these are the first iRules i am trying to write.
I need to write 2 IRules the need to reference the same information theough different conversations.
the first needs to redir...
Patrick_Chang_7
Sep 27, 2011Historic F5 Account
I believe your first iRule will do what you wish, but it looks like you are trying to add the serverxx as a query. If this is the case, you will need to insert a "?" like the following
HTTP::redirect "mysite.com/nextserver/$uri\?$serverxx"
Then, your 2nd iRule should work. However, if the original URI already contains a query (i.e a "?" followed by other text), then this will not work. If you could insert the $serverxx as a query parameter, is serverxx=$serverxx, you could just check for that in the 2nd iRule and it would always work. One would have to search in the first iRule to insert the query parameter differently if the original URI already contains query parameters. ?serverxx=$serverxx if there is no query parameter and ,serverxx=$serverxx if there is already a query parameter(s).
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