0

I have 2 servers. example.com and proxy.example.com

I would like proxying /server/(.)/banner/(.) to http://proxy.example.com/banners/banner_$2_$1.png

I have prepared in example.com apache2 vhost settings the following rule

RewriteRule   ^/server/(.*)/banner/(.*)$  http://proxy.example.com/banners/banner_$2_$1.png  [P]

But it does not work. What is wrong here?

I test by https://example.com/server/123456/banner/560x95

Dream
  • 11
  • 1

1 Answers1

0

My wrong. RewriteRule is bad for that.

I have resolved the problem.

I sould use ProxyPassMatch and now it works.

ProxyPassMatch  "^/server/(.*)/banner/(.*)$" "http://mg-cdn.ovh/banners/banner_$2_$1.png"
Dream
  • 11
  • 1