B
B
bsideup2014-04-10 21:02:56
Apache HTTP Server
bsideup, 2014-04-10 21:02:56

How to proxy change requests from POST to GET in Apache?

Hello!
Is it possible to proxy (ProxyPass, for example) requests from POST to GET using regular Apache tools?
For example, I have a config:

<VirtualHost *:80>
    ProxyPass / http://localhost:8080/ retry=0
    ProxyPassReverse / http://localhost:8080/ retry=0
</VirtualHost>

And I want that even if I received a POST request, it would be changed to a GET request (with the loss of the POST body).
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry T., 2014-04-11
@tyzhnenko

RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^POST
RewriteRute (.*) http://%{HTTP_HOST}/$1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question