My aim is as follow : I want to use a form and a javascript
location.replace() together, in order to replace the curent page in the
browser's history list.
So I'm forced to use the GET method (there doesn't seem to be a way to
achieve this through location.replace when using the POST method).
But when using GET, the parameters will appear at the end of the URL
displayed in the client's browser, which I don't want. This URL is the
one returned by the server's response and could be different from the
one appearing in the request (I need to check this however). So if I
could remove the parameters from the Request-Line sent to the client,
it would be OK : the client wouldn't see the parameters in the url but
I still could use the GET parameters through $_GET for instance.
I cannot use a :
header("Location: http://mysite.com/myuri/");
exit;
because it works differently ; it first sends the new location to the
client which then requests the new page. It costs a second
request-response exchange. Further more, in [From Req: GET
/myuri?key1=val1 HTTP/1.1], the key1=val1 is a true parameter, not an
url. I'm not interested in doing on the fly url translation.
Removing the parameters from the url with Apache's rewriting module
wont do it neither, because PHP would in this case never receive the
parameters.
So modifying the request-line with PHP - if possible - is the only
solution I've found till now.
Patrice