Skrevet av Emne: Web server returns Method Not Allowed when attemting to submit a web form  (Lest 5273 ganger)

ATC

  • Gjest
Web server returns an error message "Method Not Allowed" when attempting to submit a web form. The message is usually followed up with "The requested method POST is not allowed for the URL /full/path/to/document.html"



ATC

  • Gjest
  • [applaud]0
  • [smite]0
  • The web server will usually consider any file named *.htm, *.html or *.shtml to be static and incapable of reading data from STDIN, and therefore unsuitable for accepting the FORM method POST. This is true even for files containing Server Side Includes (SSI)

    Alter the referring HTML code to use method=GET instead, this allows embedded or included code to fetch the FORM parameters from the environment variable "QUERY_STRING" instead of reading it from STDIN (standard input)