# How to get a value from upstream and redirect to another url according to the value?

**URL:** <https://www.ruby-forum.com/t/how-to-get-a-value-from-upstream-and-redirect-to-another-url-according-to-the-value/205804>\
**Category:** NGINX\
**Created:** [April 15, 2011, 8:57pm UTC](https://www.ruby-forum.com/t/how-to-get-a-value-from-upstream-and-redirect-to-another-url-according-to-the-value/205804 "2011-04-15T20:57:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 15, 2011, 8:57pm UTC](https://www.ruby-forum.com/t/how-to-get-a-value-from-upstream-and-redirect-to-another-url-according-to-the-value/205804/1 "2011-04-15T20:57:38Z")

</div>

hello

i want to write a module , in this module i first get a value from the  
memcache upstream , then i will redirect the url according to the value  
i got?

i know how to get a value from memcache upstream, but i don’t not know  
where and when and how i redirect to another url.

thanks for your reading .

Posted at Nginx Forum:

> **[how to get a value from upstream and redirect to another url according...](https://forum.nginx.org/read.php?2,191581,191581#msg-191581)**
>
> hello i want to write a module , in this module i first get a value from the memcache upstream , then i will redirect the url according to the value i got? i know how to get a value from memcache upstream, but i don't not know where and when and how...
