I’m setting up a new web server, and there’s a slight problem.
Whenever I try to use a simple post form (ie):
<form method="POST" action="http://IP/comments.php">
<p><label>Email: </label>
<input type="text" name="login_email" />
</p>
<p>
<input type="submit" value="Login" />
</p>
</form>
The browser redirects to my remote address instead of comments.php. What is the problem here?
Comments.php:
<?php echo "This is an empty page"; ?>
Note that if the target is an html file, the form executes. So the problem appears to be sending post data to a PHP file
Your webserver returns error code 301 when
POSTing tocomments.php(see below). This is not a PHP problem, but probably a configuration error. You should check your virtual host configuration files or any.htaccessfiles that might reside in the directory in question.