# Nginx rewrite configuration

**URL:** <https://www.ruby-forum.com/t/nginx-rewrite-configuration/238305>\
**Category:** NGINX\
**Created:** [January 2, 2014, 3:29pm UTC](https://www.ruby-forum.com/t/nginx-rewrite-configuration/238305 "2014-01-02T15:29:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [January 2, 2014, 3:29pm UTC](https://www.ruby-forum.com/t/nginx-rewrite-configuration/238305/1 "2014-01-02T15:29:48Z")

</div>

hi! i’m newbie so having a hard time!  
I have a question about rewrite configure in nginx!

RULE is [http://URL/[option]/http://URL](http://URL/%5Boption%5D/http://URL) .

I mean…  
for example,

if request is [http://aaa.net/25X25/http://bbb.net/ccc.jpg](http://aaa.net/25X25/http://bbb.net/ccc.jpg) ,  
rewrite is /25X25/bbb.net.jpg

should i use regular expression?  
please help me!

thank you 😃

Posted at Nginx Forum:

> **[nginx rewrite configuration](https://forum.nginx.org/read.php?2,245954,245954#msg-245954)**
>
> hi! i'm newbie so having a hard time! I have a question about rewrite configure in nginx! RULE is http://URL/\[option\]/http://URL . I mean... for example, if request is http://aaa.net/25X25/http://bbb.net/ccc.jpg , rewrite is /25X25/b
