Forum Discussion
mguned_60772
Nimbostratus
Feb 19, 2010URL Rewrite findstr
Trying to do the following:
Redirect -
https://oldsite.com/xxx/xxx/xxx.asp?firststring=FIRSTxxxx_xxxxsecondstring=SECOND
to -
http://newsi...
hoolio
Cirrostratus
Feb 23, 2010Sorry.. typing faster than I was reading. The URI::query command should return whatever is between mailDrop= and the next & or the end of the string, regardless of the length of that value. Are you wanting to only use the first four characters of the mailDrop parameter value even if it's longer in some cases? Do you see a & in the redirect string (or what exactly do you see in the string and is that what the mailDrop parameter value is set to in the original URI)?
If you do want to take only the first four characters of the mailDrop parameter value, you can use this:
HTTP::redirect "http://newsite.com/buy.aspx?Quantity=0&CouponCode=[string range [URI::query "?&[HTTP::query]" &mailDrop] 0 3]"
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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