Forum Discussion
mguned_60772
Nimbostratus
Dec 18, 2009URI - Rewrite - Redirect?
Is there a way to grab part of the URI and insert into the redirected URL?
Example:
redirect http://domain.com/bookstore/detail.asp?sku=xxxx (extract xxxx)
to http://newdomain.com/(insert xxxx).aspx
I have never had to do something this complex before....any help is much appreciated!
2 Replies
- Hamish
Cirrocumulus
Absolutely.
You can grab the parameter provided to the URI using the 'URI::query ' command. So something like
set extract [URI::query [HTTP::query] "sku" ]
will set the variabe $extract to the value passed in the sku parameter. Then simply include the variable in the redirect command. e.g.
HTTP::redirect "http://newdomaind.com/$extract.aspx"
H - mguned_60772
Nimbostratus
Got it...it's working...thanks for the help!
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