You can use RewriteCond and RewriteRule on a webserver. The RewriteRule evaluates the HTTP method used and RewriteRule blocks the request with error 403 Forbidden.
RewriteCond %{REQUEST_METHOD} ^(PUT|DELETE|TRACE|OPTIONS|CONNECT)$ [NC]
RewriteRule .* - [F]