Forum Moderators: phranque
If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
In other words, 302 redirects are not usually allowed for POSTs.
Jim
So how does your script support POST? Do you have a different "upload" script, or does the current script handle POSTs as well?
mod_rewrite can use a RewriteCond to test the HTTP method and rewrite to different scripts based on the HTTP method used by the client, if that might help you.
Jim
<?PHP
$path = explode('/', $_GET['q']);
$var = $path[0];
if($var == "testing"){
if(isset($_POST['upload'])){
echo ("yes");
}
?>
<form action="/testing/" method="post" enctype="multipart/form-data" name="form">
<input type="file" name="upload" id="upload">
<input name="submit" type="submit" value="submit">
</form>
<?PHP
}
?>