0

We are currently using mod_proxy to proxy to proxy to the correct destination with the following line:

ProxyPass /my-path balancer://server/path/to/real/thing

However, a third party is sending us requests with the wrong content type. Getting them to change is not an option, so I thought that using mod_rewrite I would be able to do this with the following

RewriteRule ^/my-path(.*) balancer://server/path/to/real/thing$1 [P,T=text/xml]

However, this does not seem to be doing anything, and the rule does not appear to be being executed.

Is it possible to use mod_rewrite to achieve this, and am I setting this correctly for this purpose?

1 Answer 1

0

If your rule is not being executed then it may best to use the rewrite log to debug, details here: http://wiki.apache.org/httpd/RewriteLog

Post the log if you are having trouble interpreting it.

However You should be able to use the Header directive to do this. mod_rewrite should always be the last resort.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.