# Rewrite rule of url w/args to url?

**URL:** <https://www.ruby-forum.com/t/rewrite-rule-of-url-w-args-to-url/226129>\
**Category:** NGINX\
**Created:** [December 14, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/rewrite-rule-of-url-w-args-to-url/226129 "2010-12-14T16:38:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_La\_Ferla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4af34b/32.png) [@Robert\_La\_Ferla](https://www.ruby-forum.com/u/Robert_La_Ferla)\
**Post date:** [December 14, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/rewrite-rule-of-url-w-args-to-url/226129/1 "2010-12-14T16:38:09Z")

</div>

I want to rewrite:

/somedirectory/file.zip?arg1=testing/test&opt=yes

to

/somedirectory/file.zip/testing/test

i.e. it takes the base path and appends $arg1 to it and strips out  
other args.

What’s the best way to do this in nginx?

–

* * *

Robert La Ferla  
VP Engineering  
OMS SafeHarbor

This message (and any attachments) contains confidential information and  
is protected by law. If you are not the intended recipient, you should  
delete this message and are hereby notified that any disclosure,  
copying, distribution, or the taking of any action based on this  
message, is strictly prohibited.
