Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need a rewrite rule for Nginx which will rewrite all images on:

http://mysite.com/index.php/article/foo/images/image.(png|jpg|gif)

to address:

http://mysite.com/images/image.(png|jpg|gif)
share|improve this question

1 Answer 1

You'll want something like:

 rewrite ^/index.php/article/foo/images/(.*).(png|jpg|gif) /images/$1.$2 ;
share|improve this answer
    
Thanks, it works :D –  ViX Mar 11 '12 at 23:24
    
Heh, any chance you can accept or +1 the answer in the next 30 minutes? I'm trying to hit 200 points in a day! –  cjc Mar 11 '12 at 23:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.