Can any one tell me why this works:
r301 %r{(?:images\/)(\d*.jpe?g|png|gif)$}, 'http://mybucket.s3.amazonaws.com/540x310/$1'
URI = http://www.mysite.com/images/42720.jpeg
and this doesn't
r301 %r{(?:resized_images\/\d*x\d*\/)(\d*.jpe?g|png|gif)$}, 'http://mybucket.s3.amazonaws.com/540x310/$1'
URI = http://www.mysite.com/resized_images/560x344/77664.jpeg
Both work at Rubular:
http://rubular.com/r/PXHiEcoEqy
http://rubular.com/r/BfOta6YJa7
thanks in advance
----------update-------------
This is an issue with how i'm using rack-rewrite:
The rewrite isn't working with two 301 query strings.
if i comment out the first line the second works and vice versa.
Any idea how to get them both working.
use Rack::Rewrite do
r301 %r{(?:images\/)(\d*.jpe?g|png|gif|bmp)$}, 'http://mybucket.s3.amazonaws.com/540x310/$1'
r301 %r{(?:resized_images\/\d*x\d*\/)(\d*.jpe?g|png|gif|bmp)$}, 'http://mybucket.s3.amazonaws.com/540x310/$1'
end