Apache 2.2 Change HTTP Request Method From POST to GET

apache-2.2http

Is there a way I can change the HTTP Request Method from POST to GET using apache modules such as mod_rewrite or 3rd party module ?

The reason I'm doing this is to minimize server side changes as I'm doing this for a demo.

Best Answer

You could simply issue a 302 (temporary) redirect to the same URL and the browser will automatically change the request to GET. Naturally any POST data will be lost, but you say there is no POST data.

You could use the following in the Apache config (or .htaccess):

RewriteEngine On

RewriteCond %{REQUEST_METHOD} =POST
RewriteRule ^/?url-to-change-post-to-get$ %{REQUEST_URI} [R=302,L]