xmlrpc.php
is turned off on this website.
Do you want to do the same on your own WordPress site with nginx? Here’s how:
location = /xmlrpc.php {
error_page 403 = @xmlrpc;
# Add any IP addresses that are still allowed to access xmlrpc.php
allow 127.0.0.1;
deny all;
}
location @xmlrpc {
return 301 https://$host/xmlrpc/;
}
Then you just create a page with the url /xmlrpc
.
To show you that it works:
$ curl -I -L http://amedee.be/xmlrpc.php
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Thu, 29 Jun 2023 08:10:49 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://amedee.be/xmlrpc.php
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Thu, 29 Jun 2023 08:10:49 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://amedee.be/xmlrpc/
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 29 Jun 2023 08:10:50 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding, Cookie
Link: <https://amedee.be/wp-json/>; rel="https://api.w.org/"
Link: <https://amedee.be/wp-json/wp/v2/pages/1110>; rel="alternate"; type="application/json"
Link: <https://wp.me/P3A6EE-hU>; rel=shortlink