我读过nginx的HttpProxyModule的文档,但我无法弄清楚这一点:
我想这样,如果有人访问,例如http://ss.example.com/1339850978将代理他们http://dl.dropbox.com/u/xxxxx/screenshots/1339850978.png 。
如果我只是在我的configuration文件中使用这一行:
proxy_pass http://dl.dropbox.com/u/xxxxx/screenshots/; ,那么他们将不得不追加.png自己。
你可以将proxy_pass与一个rewrite指令结合起来:
rewrite /([^/]+) /$1.png break; proxy_pass http://dl.dropbox.com/u/xxxxx/screenshots/;