I am establishing a brand new web server, and there is a small problem.
Whenever I use an easy publish 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 rather than comments.php. What's the problem here?
<?php echo "This is an empty page"; ?>
Observe that when the target is definitely an html file, the shape executes. Therefore the problem seems to become delivering publish data to some PHP file
what about doing something similar to this
<form method="POST" action="comments.php">
Your webserver returns error code 301 when
comments.php (see below). This isn't a PHP problem, but most likely a configuration error. You can examine your virtual host configuration files or any
.htaccess files that may live in your directory under consideration.
$ netcat 18.104.22.168 80 POST /comments.php HTTP/1.1 Host: 22.214.171.124 Content-Length: 1 a HTTP/1.1 301 Moved Permanently Date: Tue, 10 Jan 2012 03:18:28 GMT Server: Apache/2.2.21 (Amazon) Location: http://126.96.36.199/$ Content-Length: 228 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://188.8.131.52/$">here</a>.</p> </body></html>