Forum Discussion
mguned_60772
Feb 19, 2010Nimbostratus
URL Rewrite findstr
Trying to do the following:
Redirect -
https://oldsite.com/xxx/xxx/xxx.asp?firststring=FIRSTxxxx_xxxxsecondstring=SECOND
to -
http://newsi...
mguned_60772
Feb 23, 2010Nimbostratus
So here is what I have:
when HTTP_REQUEST {
if { [HTTP::uri]contains "/bookstore/checkout/mailingSeOrderEntry.asp" } {
set extract [findstr [HTTP::uri] "mailDrop=" 9 "&" ]
HTTP::redirect "http://newsite.com/buy.aspx?Quantity=0&CouponCode=extract$"}
}
What is happening is that the findstr is appending everything behind mailDrop and not just the 4 characters that are needed. I also wanted to mention that it will always be only 4 characters.
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