我已经设置了下面的nginx重写规则。 但似乎没有工作,
*
location /images { rewrite ^(.*)$1 http://sub.domain.com/$1 permanent; }
为图像我试图redirect到另一个域。 我怎么能做这个工作?
你不需要在这里捕获正则expression式。 尝试这个:
location /images { rewrite ^ http://sub.domain.com$request_uri permanent; }