PHP put,delete request 404 on IIS

Source: Internet
Author: User

Method One: Configure the C:\Windows\System32\inetsrv\Config\applicationHost.conf Put,delete

Method Two: The most widely used method, modify the project's Web. config file, paste the following code in <system.webServer></system.webServer>, remove Webdavmodule

<modules runallmanagedmodulesforallrequests="true"> <remove name="Webdavmodule"/> </modules> "php_via_fastcgi"/> <remove name="WebDAV"/> <add name="php_via_fastcgi"Path="*.php"verb="Get,head,post,put,detele"modules="Fastcgimodule"Scriptprocessor="C:\Program Files (x86) \php\v5.6\php-cgi.exe"Resourcetype="either"requireaccess="Script"/> 

Note that the PHP root directory of the scriptprocessor to correspond to the environment

Method Three: The second-wide network of methods, but also the most unreliable, a statement on the 503 method, I do not have WebDAV locally, so this time did not try this method.

The reason for this is that IIS installs a WebDAV module by default, and this module blocks HTTP put and delete requests.

As a result, the workaround is simple, in the Web site where you have deployed the Internet API, remove the WebDAV module.

As shown in the Web application, which contains the web API REST service, open the Modules tab, check "Webdavmodule", and right click on "Delete".
Once deleted, visit the website again and you can see that it works fine.

Method Four: This is the method I use, not mentioned on the Internet, so write this essay,

1. Click on handler Mappings

2. Select Php-cig, edit request limit

3. Add Put,delete

After you confirm, you may receive the following error,

Then restart IIS and try the put request successfully!

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

PHP put,delete request 404 on IIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.