help with location tag / reg ex
Ilan Berkner
ilan at time4learning.com
Thu Dec 29 19:26:24 UTC 2011
Thank you for your response, I was able to resolve, really appreciate it.
My solution was along the same lines as yours.
On Thu, Dec 29, 2011 at 2:22 PM, Valentin V. Bartenev <ne at vbart.ru> wrote:
> On Thursday 29 December 2011 22:51:13 Ilan Berkner wrote:
> > I'd like to match all of the media files in this sub directory (and
> > subsequent directories) but its not working.
> >
> > location ~* /_games/\.(jpg|jpeg|png|gif|swf|flv|mp3)$ {
> > expires max;
> > }
> >
> > My regular expression is off the mark...
> >
>
> Your regexp matches URIs only like these:
> /_games/.gif
> /_games/.flv
> etc...
>
> Probably, you want:
>
> location ~* /_games/.+\.(?:jpe?g|png|gif|swf|flv|mp3)$ {
> expires max;
> }
>
> or, maybe:
>
> location /_games/ {
> location ~* \.(?:jpe?g|png|gif|swf|flv|mp3)$ {
> expires max;
> }
> }
>
> Please, read:
> man pcrepattern
> man pcresyntax
>
>
> wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
--
Ilan Berkner
Chief Technology Officer
Time4Learning.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20111229/08bb43cd/attachment.html>
More information about the nginx
mailing list