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.
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]
mod_rewrite
. This is a server side change. Also, not all POST requests can be changed to GET. The URL has a maximum allowed length. For example, this is not possible if you posting files.