Hi,
I have some applications behind an Apache proxy actually. Will replace it by nginx. Actually for my tests, very happy.
But for few, I'm not able to reproduce the exact behaviour of Apache and still get errors.
For exemple, my XBMC reverse. I have under Apache a redirect for GET and a passthrough for POST requests.
I'm able to reproduce the rewritecond, but I'm failing to retrieve some file in the POST calls. So seems that's around the translation of the RewriteRule I have issue.
Can anyone help me ?
I have my Apache code with me (it's already in use) and will post my nginx tests as soon as possible.
#RewriteEngine On
# Redirect subrequests GET /foo/bar to GET /xbmc/foo/bar
RewriteCond %{HTTP_REFERER} ^https?://[^/]+/xbmc
RewriteCond %{REQUEST_URI} !^/xbmc
RewriteCond %{THE_REQUEST} ^GET
RewriteRule ^/(.*) /xbmc/$1 [QSA,R]
# Rewrite subrequests POST /foo/bar to POST /xbmc/foo/bar
RewriteCond %{HTTP_REFERER} ^https?://[^/]+/xbmc
RewriteCond %{REQUEST_URI} !^/xbmc
RewriteCond %{THE_REQUEST} ^POST
RewriteRule ^/(.*) /xbmc/$1 [QSA,PT]
ProxyPass /xbmc/ http://xbmc:8080/
ProxyPassReverse /xbmc/ http://xbmc:8080/
Thanks,
Cédric