Monday, January 5, 2009

Method Not Allowed / The requested method POST is not allowed for the URL

Really a very interesting and common problem I found today. The solution is more interesting than the Problem.

This error can occur in several situations. The following list includes some of the most common reasons developers encounter this issue:

The action attribute of a form does not point to an executable script or there is no file specified for the action (in which case, the action field in the Property inspector is blank).
The form's action attribute points to an HTML file.
A developer saves web pages with an HTM or HTML file extension instead of ASP, PHP, CFM or JSP file extensions, and specifies HTM or HTML as the default file extension in the site definition.
Things to look for when receiving this error:

Specify an action attribute in the form's Property inspector
The action field cannot be left blank and must specify an executable file. Common valid file types for the form action attribute include ASP, JSP, CFM, PHP, EXE, DLL or CGI. If you use one of Dreamweaver's application objects—such as an Insert Record or Update Record—you may instead see a variable similar to <%=MM_editAction%>.
Check file extension of the web page producing the error
The page must have a file extension of ASP, PHP, ASPX, CFM or JSP. If the page has an extension of HTM or HTML, it will need to be renamed with the default extension for the server model specified in the site definition.
Check that the correct page type is specified in the site definition
Check the server model field in the Testing Server category of the site definition. The server model should match the correct language.
Another solution:

PHP: This is almost always due to Apache not being configured to treat the file you are trying to POST to as a CGI script. You can not POST to a normal HTML file; the operation has no meaning.

Please visit to find the solution: http://www.somacon.com/p126.php

One most important thing is that "your web server must support the php, asp or cgi whatever scripting language you are using". Please check is your web server support the scripting language you are using in your web site else it can generate this error. This is one of the major issue found in various problem. So plz check your web server.

If you feel this blog gives you a proper solution, please post your comments.

Regards,
Vijay Modi

No comments:

Post a Comment