Help with rewrite rule

I’m trying to rewrite any png files referenced through the fancybox sub
directory to a directory off of the images folder as follows:

rewrite ^/fancybox/(.+.png)$ /images/fancybox/$1 last;

This is not working, probably b/c my regex is off the mark. Any
suggestions?

Thanks

Solved it with this rule:

rewrite ^(.*)/fancybox/(.+\.png)$ /images/fancybox/$2 last;

---------- Forwarded message ----------
From: Ilan B. [email protected]
Date: Sun, Jan 1, 2012 at 9:20 PM
Subject: Help with rewrite rule
To: [email protected]

I’m trying to rewrite any png files referenced through the fancybox sub
directory to a directory off of the images folder as follows:

rewrite ^/fancybox/(.+.png)$ /images/fancybox/$1 last;

This is not working, probably b/c my regex is off the mark. Any
suggestions?

Thanks

Ilan B.
Chief Technology Officer

6300 NE 1st Ave., Suite 203
Ft. Lauderdale, FL 33334
(954) 771-0914

http://www.twitter.com/time4learning
http://www.facebook.com/Time4Learning

Time4Learning.com - Online interactive curriculum for home use, PreK-8th
Grade.
Time4Writing.com - Online writing tutorials for high, middle, and
elementary school students.
Time4Learning.net - A forum to chat with parents online about kids,
education, parenting and more.
spellingcity.com - Online vocabulary and spelling activities for
teachers,
parents and students.