Location URI Wildcard

Hello,

I am trying to find a way to redirect a bunch of jpg files to an html
page.

This way is not working:

location = /attach/201204*.jpg {
root /usr/local/nginx/html;
index suspend.html;
}

Here is a real world file name: 201204031012088721.jpg

Thanks!

Regards,

Justin D. http://www.twitter.com/jdorfman

Hello!

On Tue, Apr 03, 2012 at 03:10:07PM -0700, Justin D. wrote:

Here is a real world file name: 201204031012088721.jpg

location ~ ^/attach/201204.*.jpg$ {
alias /usr/local/nginx/html/suspend.html;
}

Maxim D.

Perfect thanks Maxim!

Regards,

Justin D. http://www.twitter.com/jdorfman

NetDNA http://www.netdna.com
The Science of Acceleration

Email / gtalk: [email protected]
P: 1.323.301.1400 x 272
Skype: netdna-justind
Twitter: @jdorfman http://www.twitter.com/jdorfman

www.NetDNA.com http://www.netdna.com/ |
www.MaxCDN.comhttp://www.maxcdn.com/

@NetDNA http://twitter.com/NetDNA | @MaxCDN
http://twitter.com/MaxCDN