Knowledge Base Article

My Facebook application is displaying 'Method Not Allowed'

If you are encountering this problem with your Facebook application hosted on your SiteGround hosting account, then your application is most likely based on HTML.

By default POST is not within the allowed methods for HTML files because that language cannot process POST queries. Even though Facebook are aware of this, their API is structured to always execute a POST query to the target URL to validate its availability. When the target is HTML, it is highly likely to encounter the "Method Not Allowed" error.

In order to prevent facing this error you need to change the way Apache handles requests to HTML files. The most commonly used method is to force HTML files to be handled by PHP. You can do this by creating an .htaccess file in your application's main directory, and adding the following line:

AddHandler application/x-httpd-php52 .html .htm .shtm

If you are having difficulties applying this fix to your Facebook application, hosted on a SiteGround hosting account, please feel free to contact our Technical Support Team and we will apply the required modifications for you.



Rating

Please indicate if this article was helpful for you.

rating :  4.7 from 5
views :  340
votes :  3

Related Articles

Views

HTTP Error 403 - Forbidden 147019
HTTP Error 500 - Internal server error 140295
SSL Error - Certificate Not Trusted 61074
How to enable error reporting in a PHP script? 29710
HTTP Error 503 - Service unavailable 29423

Haven't found what you are looking for? Suggest an article HERE.

powered by

Valid XHTML 1.0 Strict Valid CSS!