# Use proxy store with url parameters

**URL:** <https://www.ruby-forum.com/t/use-proxy-store-with-url-parameters/127843>\
**Category:** NGINX\
**Created:** [February 1, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/use-proxy-store-with-url-parameters/127843 "2008-02-01T20:08:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casey\_Rayman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@Casey\_Rayman](https://www.ruby-forum.com/u/Casey_Rayman)\
**Post date:** [February 1, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/use-proxy-store-with-url-parameters/127843/1 "2008-02-01T20:08:01Z")

</div>

I have been trying to get proxy\_store to work with a url of the form /  
resource?resourceId=XXX where XXX is a number. This url actually  
returns a graphic from a database which does not change often. Is is  
possible to have proxy store work in this case where the XXX is the  
only part of the URL which is any different?

My most recent attempt:

```
     location /resource {
             root /var/www/data/fetch;
             error_page 404 = /fetch$args;
     }
     location ^~ /fetch/ {
             internal;
             proxy_pass http://10.0.3.197:8246;
             proxy_store /var/www/data/fetch$args;
             proxy_store_access user:rw group:rw all:r;
     }

```

Regards,  
Casey

---

<div class="post-metadata">

**Author:** ![Casey\_Rayman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@Casey\_Rayman](https://www.ruby-forum.com/u/Casey_Rayman)\
**Post date:** [February 2, 2008, 8:37am UTC](https://www.ruby-forum.com/t/use-proxy-store-with-url-parameters/127843/2 "2008-02-02T08:37:24Z")

</div>

Try replacing `/fetch/$args` in your `proxy_store` statement with `$request_uri`. It should already be rewritten from the `error_page`  
statement.

e.g.

- 

```
          proxy_store /var/www/data/fetch$args;

```

- 

```
          proxy_store /var/www/data$request_uri;
```
